Regression - http error codes and message not displayed properly on the UI
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
If an http request fails I expect Insomnia to show the http status code (4xx, 5xx, etc) and the error message in the preview. This used to work but broke recently.
### Actual Behavior
When there is a request failure the http status code is not displayed and an internal error message is shown in the preview. The error message is:
```
message: undefined; stack: Error: message: Cannot read properties of undefined (reading '0'); stack: TypeError: Cannot read properties of undefined (reading '0')
at fn0 (eval at S (file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Ci3kk9w5.js:1:664), :12:21)
at eval (eval at S (file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Ci3kk9w5.js:1:664), :22:13)
at S (file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Ci3kk9w5.js:8:25)
at async file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Ci3kk9w5.js:1:346
at port.onmessage (/Applications/Insomnia.app/Contents/Resources/app.asar/preload.js:145:18)
```
Here is a recording of the issue happening when calling an endpoint multiple times until it hits a rate limit (429).

And this screenshots show a 500 that doesn't get properly displayed in preview.
### Reproduction Steps
Make a request that fails.
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [x] Insomnia Cloud sync.
- [ ] Local only
### Additional Information
This used to work fine a few releases ago.
### Insomnia Version
11.0.2
### What operating system are you using?
macOS
### Operating System Version
Sequoia 15.4.1
### Installation method
download
### Last Known Working Insomnia version
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.