mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fix(core): Return correct error message if Axios error (#3478)
This commit is contained in:
parent
74e6b06467
commit
1bef4df75f
|
@ -290,6 +290,12 @@ export class NodeApiError extends NodeError {
|
||||||
// only for request library error
|
// only for request library error
|
||||||
this.removeCircularRefs(error.error as JsonObject);
|
this.removeCircularRefs(error.error as JsonObject);
|
||||||
}
|
}
|
||||||
|
// if it's an error generated by axios
|
||||||
|
// look for descriptions in the response object
|
||||||
|
if (error.isAxiosError) {
|
||||||
|
error = error.response as JsonObject;
|
||||||
|
}
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|
Loading…
Reference in a new issue