Why is request status 400 not considered as failed?


why does flows evaluate a 400 Bad Request not as failed?

Hi @jens-spaeth

Because you have a passing test it will “pass”(send out of the success port) the block. If you want it to fail you can add a test to expect status 200 (or whatever status you expect).

If you had no tests, then the block should fail.


if i write a test like this, i can force the block to fail.

pm.test("Status code should not start with 4 or 5", function () {
    pm.expect(pm.response.code.toString().charAt(0)).to.not.be.oneOf(['4', '5']);

But for now i don’t need any tests so i opted for removing the one test that was already sitting there.

Thx for the explanation.

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