DEV Community

Discussion on: When do you need axios?

Collapse
 
shubhambattoo profile image
Shubham Battoo

Error handling is very nicely done in axios too. With fetch lots of if statements for simple error handling.

Collapse
 
fleepgeek profile image
Emmanuel Okiche

Ah this is true. I intended adding that to the article but forgot.
Yeah. fetch throws for only network errors and you'll have to manually check for other errors unlike axios.

Guess I'll have to add this to the article with an example.

Thanks for sharing