Stop request call from its pre-script, and continue with the next call

I want my workflow to be easy to read and maintain. for that I need to meet this “feature” am looking for:

I need to be able to stop a request from being sent from its pre-script, this way I can just move the request around and not worry about the condition in the test script of the previous request. This feature would also add some clarity to postman scripts.

I read that there is a workaround by using
throw new Error("Entity values do not match");
but it appears that will also cancel all calls after the one I just want to skip when using the collection runner or postman.

This is currently not supported.

There are inter-linked issues open around the same:


https://github.com/postmanlabs/postman-app-support/issues/1757 (you can subscribe to this on GitHub for further updates on the development of this feature)

Also, there’s a workaround mentioned here:

Closing this thread since it’s a duplicate.

1 Like