mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(core): Improve error message
This commit is contained in:
parent
b49d493653
commit
d7c6833dc3
|
@ -122,10 +122,15 @@ export class Worker extends Command {
|
||||||
const executionDb = await Db.collections.Execution.findOne(jobData.executionId);
|
const executionDb = await Db.collections.Execution.findOne(jobData.executionId);
|
||||||
|
|
||||||
if (!executionDb) {
|
if (!executionDb) {
|
||||||
LoggerProxy.error('Worker failed to find execution data in database. Cannot continue.', {
|
LoggerProxy.error(
|
||||||
executionId: jobData.executionId,
|
`Worker failed to find data of execution "${jobData.executionId}" in database. Cannot continue.`,
|
||||||
});
|
{
|
||||||
throw new Error('Unable to find execution data in database. Aborting execution.');
|
executionId: jobData.executionId,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
throw new Error(
|
||||||
|
`Unable to find data of execution "${jobData.executionId}" in database. Aborting execution.`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
const currentExecutionDb = ResponseHelper.unflattenExecutionData(executionDb);
|
const currentExecutionDb = ResponseHelper.unflattenExecutionData(executionDb);
|
||||||
LoggerProxy.info(
|
LoggerProxy.info(
|
||||||
|
|
Loading…
Reference in a new issue