diff --git a/packages/workflow/src/NodeErrors.ts b/packages/workflow/src/NodeErrors.ts index b672861327..4c8e014e42 100644 --- a/packages/workflow/src/NodeErrors.ts +++ b/packages/workflow/src/NodeErrors.ts @@ -316,12 +316,17 @@ export class NodeApiError extends NodeError { (error?.reason as IDataObject)?.description) as string; } - if (!httpCode && !message && error.status === 'rejected') { + if ( + !httpCode && + !message && + this.message && + this.message.toUpperCase().includes('ECONNREFUSED') + ) { httpCode = 'ECONNREFUSED'; const originalMessage = this.message; - if (!description && originalMessage) { - this.description = `${originalMessage} ${this.description ?? ''}`; + if (!description) { + this.description = `${originalMessage}; ${this.description ?? ''}`; } } diff --git a/packages/workflow/test/NodeErrors.test.ts b/packages/workflow/test/NodeErrors.test.ts index 05556f4748..9dd1024621 100644 --- a/packages/workflow/test/NodeErrors.test.ts +++ b/packages/workflow/test/NodeErrors.test.ts @@ -61,7 +61,6 @@ describe('NodeErrors tests', () => { it('should return default message for ECONNREFUSED', () => { const nodeApiError = new NodeApiError(node, { - status: 'rejected', message: 'ECONNREFUSED', });