[GH-ISSUE #1996] [bug]: Tests don't run when request fails #645

Closed
opened 2026-03-16 16:29:54 +03:00 by kerem · 1 comment
Owner

Originally created by @dsolay on GitHub (Dec 6, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1996

Originally assigned to: @AndrewBastin on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I make a request and the returned status code is 4.x.x or 5.x.x, the tests are not executed

Steps to reproduce

  1. Make a request to https://swapi.dev/api/peoples
  2. Go to the Tests tab and paste de following code:
pw.test("Not Found", () => {
    pw.expect(pw.response.status).toBe(404)
});
  1. Send the request
  2. The returned status code is 404 but the tests are not executed

Environment

Production

Version

Cloud

Originally created by @dsolay on GitHub (Dec 6, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1996 Originally assigned to: @AndrewBastin on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I make a request and the returned status code is 4.x.x or 5.x.x, the tests are not executed ### Steps to reproduce 1. Make a request to `https://swapi.dev/api/peoples` 2. Go to the `Tests` tab and paste de following code: ``` pw.test("Not Found", () => { pw.expect(pw.response.status).toBe(404) }); ``` 3. Send the request 4. The returned status code is `404` but the tests are not executed ### Environment Production ### Version Cloud
kerem 2026-03-16 16:29:54 +03:00
Author
Owner

@AndrewBastin commented on GitHub (Dec 6, 2021):

Hi @dsolay,

I have pushed a patch, should be live in 5-10 minutes, please open Hoppscotch and perform an Update Reload and this issue should be fixed.

But we have noticed a small behavior inconsistency between the different strategies, in which without the extension or the proxy server, Hoppscotch doesn't try to process non-200 responses. We are tracking the issue internally and since we were planning to do a refactor of the entire Strategy system to align with our recent code standards. So until then Extensions and Proxy will only support 404 response data.

<!-- gh-comment-id:986849371 --> @AndrewBastin commented on GitHub (Dec 6, 2021): Hi @dsolay, I have pushed a patch, should be live in 5-10 minutes, please open Hoppscotch and perform an Update Reload and this issue should be fixed. But we have noticed a small behavior inconsistency between the different strategies, in which without the extension or the proxy server, Hoppscotch doesn't try to process non-200 responses. We are tracking the issue internally and since we were planning to do a refactor of the entire Strategy system to align with our recent code standards. So until then Extensions and Proxy will only support 404 response data.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#645
No description provided.