Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: XML/CSV detection heuristic is inaccurate #105

Open
moltar opened this issue Apr 9, 2018 · 1 comment
Open

Bug: XML/CSV detection heuristic is inaccurate #105

moltar opened this issue Apr 9, 2018 · 1 comment

Comments

@moltar
Copy link

moltar commented Apr 9, 2018

if (body.slice(0, 5) !== '<?xml') {

FulfillmentInventory.ListInventorySupply call does not return a valid XML prolog, thereby <?xml test fails and the CSV is assumed.

First line of the response is:

<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">
@donhmorris
Copy link

There is a similar problem in request.js when retrieving a browse tree report using Reports.GetReport.

I made a temp fix by altering this code in request.js:

getResult(data) {
    const path = `${this.options.basePath}` + (this.options.data ? `.${this.options.data}` : '');

    const isArray = this.options.isArray;
    return maybeArrayify(isArray, path ? _.get(data, path, **data**) : data);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants