Hi there,
sorry if this is a newbie questions.
I’ve followed the Amazon Ads API instruction and I’m stuck at this step here.
Meaning I’ve successfully generated a report via postman (status 200 ok).
But when trying to request the status, I get the following error:
There was an error in evaluating the Pre-request Script:TypeError: Cannot read properties of undefined (reading ‘startsWith’)
Does anyone know why this happens and how to solve this?
Thanks so much !
The error is being caused by code in a pre-request script, so logically that is where you need to start. You can have pre-request scripts on the request, folder or collection, so you might need to check all of those locations.
Hi Mike,
thanks for your quick reply, I appreciate it !
I did find a pre-request script, see the attached screenshot.
However, this is the original code provided by Amazon.
All I did is follow their developer instructions and installed the environment and collection files.
So it works out of the box, and I didn’t change anything, especially not the scripts.
Are you saying I need to meddle with the original Amazon code?
I would assume they know what they were doing and the code is fine as is?
Thanks!