-
-
Notifications
You must be signed in to change notification settings - Fork 147
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 response object from error when http status is 404 #261
Comments
Hello. I have the exact same problem. I am using the owncloud-sdk which depends on this package and it have the same problem. I have tested different releases (4.0 and above) but all of them have the same problem. |
Thanks for the report, looking into this now. |
I don't see that 4.1.0 would have had Can someone point me to the regression that occurred after 4.1.0? Also, if you check the types, |
@perry-mitchell, found that the issue was because the error is not handled by axios for any status codes (https://github.com/perry-mitchell/webdav-client/blob/master/source/request.ts#L52). I've made a simple fix PR that worked for me, please have a look #262 |
Thanks @dpakach - I left a review on the MR. If we agree I'll happily merge it this week. |
@perry-mitchell, I've fixed the PR according to your review, please have a look |
When making a dav request, if we get 4xx status code, then we cannot read the response object from the error.
eg.
In version 4.1.0 we can read the body of the actual response
but with the latest version 4.4.0, the response object is not returned in the error
The text was updated successfully, but these errors were encountered: