question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
flyhercommented, Mar 29, 2018

@jkunwar I have to keep the old version until the issue be fixed.

0reactions
github-actions[bot]commented, Oct 19, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found