mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Convey error stack from job failure to main (#11261)
This commit is contained in:
@@ -114,6 +114,7 @@ export class ScalingService {
|
||||
executionId,
|
||||
workerId: this.instanceSettings.hostId,
|
||||
errorMsg: error.message,
|
||||
errorStack: error.stack ?? '',
|
||||
};
|
||||
|
||||
await job.progress(msg);
|
||||
@@ -295,12 +296,18 @@ export class ScalingService {
|
||||
});
|
||||
break;
|
||||
case 'job-failed':
|
||||
this.logger.error(`Execution ${msg.executionId} (job ${jobId}) failed`, {
|
||||
workerId: msg.workerId,
|
||||
errorMsg: msg.errorMsg,
|
||||
executionId: msg.executionId,
|
||||
jobId,
|
||||
});
|
||||
this.logger.error(
|
||||
[
|
||||
`Execution ${msg.executionId} (job ${jobId}) failed`,
|
||||
msg.errorStack ? `\n${msg.errorStack}\n` : '',
|
||||
].join(''),
|
||||
{
|
||||
workerId: msg.workerId,
|
||||
errorMsg: msg.errorMsg,
|
||||
executionId: msg.executionId,
|
||||
jobId,
|
||||
},
|
||||
);
|
||||
break;
|
||||
case 'abort-job':
|
||||
break; // only for worker
|
||||
|
||||
Reference in New Issue
Block a user