mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
Adding isAxiosError flag to errors thrown by axios (#1419)
This commit is contained in:
committed by
Khaled Garbaya
parent
c0b40650d1
commit
b681e919c4
@@ -15,8 +15,11 @@ module.exports = function enhanceError(error, config, code, request, response) {
|
||||
if (code) {
|
||||
error.code = code;
|
||||
}
|
||||
|
||||
error.request = request;
|
||||
error.response = response;
|
||||
error.isAxiosError = true;
|
||||
|
||||
error.toJSON = function() {
|
||||
return {
|
||||
// Standard
|
||||
|
||||
Reference in New Issue
Block a user