mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Do not display error when stopping jobless execution in queue mode (#8007)
No need to surface error to user when stopping a job no longer in queue. https://linear.app/n8n/issue/PAY-1104
This commit is contained in:
@@ -27,7 +27,7 @@ import type {
|
|||||||
IExecutionsSummary,
|
IExecutionsSummary,
|
||||||
IN8nUISettings,
|
IN8nUISettings,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
import { jsonParse } from 'n8n-workflow';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import timezones from 'google-timezones-json';
|
import timezones from 'google-timezones-json';
|
||||||
@@ -681,8 +681,8 @@ export class Server extends AbstractServer {
|
|||||||
const job = currentJobs.find((job) => job.data.executionId === req.params.id);
|
const job = currentJobs.find((job) => job.data.executionId === req.params.id);
|
||||||
|
|
||||||
if (!job) {
|
if (!job) {
|
||||||
throw new ApplicationError('Could not stop job because it is no longer in queue.', {
|
this.logger.debug('Could not stop job because it is no longer in queue', {
|
||||||
extra: { jobId: req.params.id },
|
jobId: req.params.id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await queue.stopJob(job);
|
await queue.stopJob(job);
|
||||||
|
|||||||
Reference in New Issue
Block a user