catch error when responseType is `arraybuffer` in latest version
See original GitHub issue-
axios version: v0.18.0
-
Environment: react-native ,Android
-
the code works well and return the right data in v0.16.2, but catch an error in v0.18.0.
axios({
method: 'post',
url: url,
responseType: 'arraybuffer',
data: postData
})
.then((response)=>{
//todo
})
.catch((error)=>{
//todo
})
link: #1392
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to handle error message and binary response with Axios ...
The answer is specifying response type as ArrayBuffer rather than Blob , and try to parse error responses when the response header Content-Type...
Read more >angular - how to get the error data when using responsetype ...
i am using angular13, based on output i am rendering the data as pdf using the responseType as arrayBuffer ...
Read more >XMLHttpRequest.responseType - Web APIs | MDN
The XMLHttpRequest property responseType is an enumerated string value ... The response is a JavaScript ArrayBuffer containing binary data.
Read more >Communicating with backend services using HTTP - Angular
import { Observable, throwError } from 'rxjs'; import { catchError, ... The return type varies based on the observe and responseType values that...
Read more >Understanding Axios GET requests - LogRocket Blog
The last command, npm install axios , installs the axios package as a ... The responseType option can be set to arraybuffer ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jkunwar I have to keep the old version until the issue be fixed.
Hello! 👋
This issue is being automatically marked as stale because it has not been updated in a while. Please confirm that the issue is still present and reproducible. If no updates or new comments are received the issue will be closed in a few days.
Thanks.