I have a shared collection on Postman. When I run the request in the shared collection it fails with the following error:
There was an error in evaluating the Pre-request Script: Error: Unexpected token '<' at 1:1 ^
I have tried this with several requests, the simplest request being a GET request to 'http://localhost:8000/v1/resource' with no parameters, authorization, headers, body or pre-request script and the above error still occurs.
Checking postman's console I see the following error:
JSONError: Unexpected token '<' at 1:1 ^
Which matches the one above.
When I duplicate the request and place it outside of the shared collection it works fine.
Not sure what I'm missing?
As it's a shared entity, I suspect that a team member/the Collection creator may have added a script to a different part of the Collection.
There are 3 different levels that a Pre-request Script
can be called from in Postman. The Collection level, the Sub-Folder level and the from within a single Request.
More information can be found here: