Im sending about 20 concurrent requests using Promise.all. The code looks like this:
let amazonMws = require('amazon-mws')(KEY, SECRET)let promises = [];for (...) {promise.push(amazonMws.feeds.submit(...));}let results = await Promise.all(promises);
Result: Often 1 or more of those 20 requests return error with message: "the Content-MD5 HTTP header you passed for your feed did not match the Content-MD5 we calculated for your feed". I'm 99% sure that the error is caused because the library keeps its RequestHeaders object as a parameter for the amazonMws instance. Any idea how to prevent getting those errors without having to instantiate new amazon-mws instance for each call?
PS. Instantiating new instance for each concurrent call fixes the issue.
Im sending about 20 concurrent requests using Promise.all. The code looks like this:
let amazonMws = require('amazon-mws')(KEY, SECRET)
let promises = [];
for (...) {
promise.push(amazonMws.feeds.submit(...));
}
let results = await Promise.all(promises);
Result: Often 1 or more of those 20 requests return error with message: "the Content-MD5 HTTP header you passed for your feed did not match the Content-MD5 we calculated for your feed". I'm 99% sure that the error is caused because the library keeps its RequestHeaders object as a parameter for the amazonMws instance. Any idea how to prevent getting those errors without having to instantiate new amazon-mws instance for each call?
PS. Instantiating new instance for each concurrent call fixes the issue.