You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling GetServiceStatus for the Orders API I get "Cannot read property 'list' of undefined" errors.
Looking through the code it would appear that /lib/request.js is checking for param.list when there isn't a param object.
I implemented a quick fix to check if param exists before trying to check if it has properties and executing this block of code. "if (param){" . This fixes the immediate error but I haven't had time to check if this is quite the right place to do this. Maybe the /lib/sections should define an empty params on GetServiceStatus ?
Here is the complete change, line 152 in /lib/request.js
// Lists need to be sequentially numbered and we take care of that hereif(param){if(param.list){constvalues=_.map(toCollection(value),getValue);_.forEach(values,(value,i)=>{this.values[`${param.name}.${i+1}`]=value;});}else{this.values[param.name]=getValue(value);}}
Quite happy to do a pull request if this is ok
The text was updated successfully, but these errors were encountered:
I've encountered this when needlessly specifying the MarketplaceId; that is, when I send in a parameter that is not actually specced out by MWS. I added a similar hack to bypass this error, while also adding this to the log:
if (param === undefined) {
console.log(`Couldn't find ${paramName} in request spec. Maybe you don't need it?`)
}
MWS seems to do fine with the extraneous variable so we don't stop the request, but just notify the user they may not need to send it in.
When calling GetServiceStatus for the Orders API I get "Cannot read property 'list' of undefined" errors.
Looking through the code it would appear that /lib/request.js is checking for param.list when there isn't a param object.
I implemented a quick fix to check if param exists before trying to check if it has properties and executing this block of code. "if (param){" . This fixes the immediate error but I haven't had time to check if this is quite the right place to do this. Maybe the /lib/sections should define an empty params on GetServiceStatus ?
Here is the complete change, line 152 in /lib/request.js
Quite happy to do a pull request if this is ok
The text was updated successfully, but these errors were encountered: