Postman prerequest script error

Hi all,

I have downloaded the postman v3 and environment collections from here Postman Collections | SailPoint Developer Community

However when running calls I get the following error:

There was an error in evaluating the Pre-request Script:Error: “undefined” is not valid JSON

I have two environments and this is happening against both. Both environments have the requirement variables set - tenant, clientId and clientSecret.

Any advice?

Thanks

Hi @adam_robinson !

You can debug in Postman console, use ctrl+alt+C to show console, and then use console.log to see what of your variables is undefined. For example, in the pre-request scripts tab at the collection level:

Then run any api (I try with list calls, as they does not need any parameter):

Do a console.log entry for every one of environment variables, to see which are defined and which is the problematic one.

This an example of my environment variables definition:

(The ones marked in the square is what you should have defined)

Assuming you set up an environment and populated all the variables, make sure you actually have the environment selected in the picker at the top-right. This is common for people to forget

Thanks - the console log helped as it was actually a proxy issue getting out to the API.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.