You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Insomnia Breaks test run on non-standard http status code #8844
Insomnia returns a custom status code, 900 for example, and we can see the response body, if any
Actual Behavior
Insomnia gives fatal error when encountering any non standard status code, such as 900
Insomnia does not run any post-request scripts, including the tests.
Reproduction Steps
Pre Requirement:
Have an api that returns non-standard http status code, 900
@Ilie-c is could you try to specify some status message (such as unknown) in your api?
Soo.. Sadly it appears not.
I am not the owner o the code, nor a c# dev to understand everything.
I do work in a whitebox mode but it appears that class ObjectResult does not include a status message setting, only status code. (I may be wrong here hence i'm not a dev )
I wonder if maybe this may be a good worthwhile to cover this case also in insomnia, even though I am aware that is more like a bad write of the code... Maybe a setting to set how to proceed with it, give fatal error or ignore status message and continue, which to also persist in the cli.
Activity
ihexxa commentedon Jul 17, 2025
Hi @Ilie-c , not sure if I've understood your case, I tried locally, and Insomnia executed after-response script when response code is invalid:
notjaywu commentedon Jul 22, 2025
Tried
POSTas well, can't replicate.Ilie-c commentedon Jul 22, 2025
@ihexxa The idea was that if the api sends a 900 status code, apparently without any other status message, my insomnia gives fatal fail
@notjaywu the only difference that I see is that the status code for you also has the status message. It my case It doesn't.
If it would've work then i should had at least the first test as failed, since i check for 400 status
Ilie-c commentedon Jul 23, 2025
I have also updated to latest version, 11.3.0, and the httpbin 900 status works but my API still gives fatal error.
ihexxa commentedon Jul 23, 2025
@Ilie-c is could you try to specify some status message (such as unknown) in your api?
Ilie-c commentedon Jul 23, 2025
Soo.. Sadly it appears not.
I am not the owner o the code, nor a c# dev to understand everything.
I do work in a whitebox mode but it appears that class ObjectResult does not include a status message setting, only status code. (I may be wrong here hence i'm not a dev )
I wonder if maybe this may be a good worthwhile to cover this case also in insomnia, even though I am aware that is more like a bad write of the code... Maybe a setting to set how to proceed with it, give fatal error or ignore status message and continue, which to also persist in the cli.
ihexxa commentedon Jul 23, 2025
Well, probably I can relax the constraint a bit from insomnia side.
Ilie-c commentedon Jul 23, 2025
That would be of great help.
I am sorry that I am unable to just change the code, hence the object not allowing custom status message.
ihexxa commentedon Jul 23, 2025
@Ilie-c You could have a try with builds from the bottom of this pr if it is urgent: https://github.com/Kong/insomnia/actions/runs/16466713346
Ilie-c commentedon Jul 23, 2025
Checked.
The fix works, showing the response body.