Add URL to error objects
This commit is contained in:
parent
21443b0e53
commit
b74815d41b
|
@ -45,6 +45,7 @@ export const createAPIClient = config => {
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
status: response.status,
|
status: response.status,
|
||||||
|
url: response.url,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ export const createAPIClient = config => {
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
status: 400,
|
status: 400,
|
||||||
|
url: "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,6 +149,7 @@ export const createAPIClient = config => {
|
||||||
get: requestApiCall("GET"),
|
get: requestApiCall("GET"),
|
||||||
patch: requestApiCall("PATCH"),
|
patch: requestApiCall("PATCH"),
|
||||||
delete: requestApiCall("DELETE"),
|
delete: requestApiCall("DELETE"),
|
||||||
|
put: requestApiCall("PUT"),
|
||||||
error: message => {
|
error: message => {
|
||||||
throw makeError(message)
|
throw makeError(message)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue