mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -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
|
||||
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) {
|
||||
this.message = message;
|
||||
this.description = description;
|
||||
|
|
Loading…
Reference in a new issue