Skip to content

Insomnia Breaks test run on non-standard http status code #8844

Closed

Description

@Ilie-c

Expected Behavior

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:

  1. Have an api that returns non-standard http status code, 900

Steps:

  1. Call the requests that gives 900 status code

Is there an existing issue for this?

Which sync method do you use?

  • Git sync.
  • Insomnia Cloud sync.
  • Local only

Additional Information

No response

Insomnia Version

11.2.0

What operating system are you using?

Windows

Operating System Version

Win 11 23h2, latest

Installation method

Download from insomnia

Last Known Working Insomnia version

none

Activity

  1. added
    B-bugBug: general classification
    S-unverifiedStatus: Unverified by maintainer
    on Jul 8, 2025
  2. ihexxa commented on Jul 17, 2025

    @ihexxa
    Contributor

    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:

    Image
  3. notjaywu commented on Jul 22, 2025

    @notjaywu
    Contributor

    Tried POST as well, can't replicate.

    Image
  4. Ilie-c commented on Jul 22, 2025

    @Ilie-c
    Author

    @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

    Image Image Image
  5. Ilie-c commented on Jul 23, 2025

    @Ilie-c
    Author

    I have also updated to latest version, 11.3.0, and the httpbin 900 status works but my API still gives fatal error.

  6. ihexxa commented on Jul 23, 2025

    @ihexxa
    Contributor

    @Ilie-c is could you try to specify some status message (such as unknown) in your api?

  7. Ilie-c commented on Jul 23, 2025

    @Ilie-c
    Author

    @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.

    Image
  8. ihexxa commented on Jul 23, 2025

    @ihexxa
    Contributor

    Well, probably I can relax the constraint a bit from insomnia side.

  9. Ilie-c commented on Jul 23, 2025

    @Ilie-c
    Author

    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.

  10. ihexxa commented on Jul 23, 2025

    @ihexxa
    Contributor

    @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

  11. Ilie-c commented on Jul 23, 2025

    @Ilie-c
    Author

    Checked.

    The fix works, showing the response body.

    Image
  12. self-assigned this
    on Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

B-bugBug: general classificationS-unverifiedStatus: Unverified by maintainer

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions