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

GetFeedSubmissionResult error #58

Closed
b07 opened this issue Sep 30, 2018 · 5 comments
Closed

GetFeedSubmissionResult error #58

b07 opened this issue Sep 30, 2018 · 5 comments

Comments

@b07
Copy link

b07 commented Sep 30, 2018

First of all, thanks for this useful piece of software.

async function getFeedResult(amazonAcc, feedId) {
try {
var request = {
'Version': '2009-01-01',
'Action': 'GetFeedSubmissionResult',
'SellerId': amazonAcc.sellerId,
'MWSAuthToken': amazonAcc.MWSAuthToken,
'FeedSubmissionId': feedId
}
var res = await amazonMws.feeds.search(request);
return res;
}
catch (err) {
console.log("Error AmazonUpload.getFeedResult");
throw (err);
}
}
I'm trying to get a FeedSubmissionResult as per the documentation but I get this error:

node_modules/amazon-mws/lib/AmazonMwsResource.js:269
response.Headers = ResponseHeaders;
^

TypeError: Cannot set property 'Headers' of undefined

The credentials are okay, other feed calls are working okay, the call was successful from the amazon scratchpad https://mws.amazonservices.com/scratchpad/index.html .

Seems response is undefined but not sure why. Thanks

@bhushankummar
Copy link
Owner

@b07 Thank you, I will check and get back to you.

@bhushankummar
Copy link
Owner

@b07
I did check that. Everything is working perfectly.
Can you please try with export DEBUG=MWS:* and send me what output comes in?

@b07
Copy link
Author

b07 commented Oct 2, 2018

https://pastebin.com/BQLCbaE1

It seems the call is making it through, receives a response (which is the same as I tried with the scratch-pad) but not parsing it correctly?

In this case I've only uploaded 2 orders, where one had an error warning (although the client confirmed it was uploaded successfully) but that shouldn't matter should it?

Thank you for the quick response.

@bhushankummar
Copy link
Owner

@b07
It's because of instead of the tab-delimited response, it provides the raw response. You can try below request.

    var FeedSubmissionId = '10101010XXX';
    amazonMws.feeds.search({
        'Version': '2009-01-01',
        'Action': 'GetFeedSubmissionResult',
        'SellerId': 'SELLER_ID',
        'MWSAuthToken': 'MWS_AUTH_TOKEN',
        'FeedSubmissionId': FeedSubmissionId,
        __RAW__: true
    }, function (error, response) {
        if (error) {
            console.log('error ', error);
            return;
        }
        console.log('response', response);
    });

https://github.com/bhushankumarl/amazon-mws/blob/master/examples/javaScript/feeds/getFeedSubmissionResultRaw.js

@b07
Copy link
Author

b07 commented Oct 8, 2018

Thank you very much for your help on this.

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