BREAKING 0.19 API Errors not populating correctly
See original GitHub issueAPI Error breaks existing code. The error object is no longer populated.
To Reproduce catch an error from an api.
Expected behavior I didn’t expect a minor version change to break existing code.
Is there any further guidance or documentation regarding these changes?
- Makes Axios error generic to use AxiosResponse (#1738) - Suman Lama
- Adding isAxiosError flag to errors thrown by axios (#1419) - Ayush Gupta
Environment:
- Axios Version [0.19.0]
- OS: [Windows 10 ]
- Browser [ Chrome ]
- Browser Version [75.0.3770.80 (Official Build) (64-bit)]
- Additional Library Versions [React 16.8.6]
Additional context/Screenshots const apirequest = (options) => { return authService.fetchAccessToken() .then((accessToken) => { if (!options.headers) options.headers = {};
options.headers['Authorization'] = `bearer ${accessToken}`;
return client(options)
.then(response => {
return response.data;
})
.catch(error => { console.error(error); });
});
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Axios requests not working after update from 0.19.0 to 0.21.1
Describe the issue after updating axios from 0.19 to 0.21.1 I figure ... Also, the way axios handles error responses is a breaking...
Read more >Elm 0.19 Broke Us - DEV Community
Elm 0.19 was released yesterday. There were a significant number of breaking changes at every level: configuration, tooling, library, ...
Read more >SciPy 0.19.0 Release Notes — SciPy v1.9.3 Manual
SciPy 0.19.0 is the culmination of 7 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better...
Read more >Troubleshooting App Deployment Errors - Dash Python
This troubleshooting guide describes errors that you may encounter when deploying apps to Dash Enterprise as well as steps to resolve them.
Read more >YouTube Data API - Errors | Google Developers
This document identifies the different types of errors that YouTube Data API operations can return. You can also find a list of errors...
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
Not trying to be pedantic, but you should never expect a module with a major version “0” to have a stable API. Until the author(s) put it at 1, it’s not considered stable. https://semver.org/#spec-item-4
Closed due to lack of enough information and stale. Nobody gives a reproducible code example.