Question · JavaScript and React course · Module 11: Data Fetching and APIs
Differences Between Axios and fetch
What is the key difference between Axios and the built-in fetch() in handling HTTP errors?
Answer options
- Axios does not handle HTTP errors
- Axios automatically throws an error for 4xx/5xx codes, while fetch requires manually checking response.ok
- fetch automatically throws errors, while Axios requires manual checking
- There is no difference - both work identically
You can check the correct answer by solving this task in the CodeWorlds game.