-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined (reading 'status') #295
Comments
Yeah, this is a bug. Could you help us track down where we're calling |
@jamonholmgren could the problem be here? This: if (!error.code) return getProblemFromStatus(error.response.status) Maybe it should be like this? if (!error.code) return getProblemFromStatus(error.response ? error.response.status : null) |
We're also seeing this after upgrading from |
I've got a PR ready to go whenever someone has time to look at it. |
## [2.1.6](v2.1.5...v2.1.6) (2022-08-22) ### Bug Fixes * Fixes undefined status error -- fixes [#295](#295) ([#298](#298) by [@treeduship](https://github.com/treeduship)) ([278bfbc](278bfbc))
🎉 This issue has been resolved in version 2.1.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi I have upgraded to v
Is this the same issue, just happening in another part of the code? |
@stesvis Interesting ... could be another part of the code. The backtrace isn't all that useful there. |
When the response is ERR_CONNECTION_REFUSED (in my case, server down), every API call throws an exception.
My understanding was that we shouldn't need to wrap calls inside a
try/catch
block, but instead an exception is still thrown.Is there a solution or workaround, to avoid refactoring all the code to handle api exceptions?
Version:
"apisauce": "^2.1.5",
Here's the full error:
The text was updated successfully, but these errors were encountered: