mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08: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:
parent
9d22c7a278
commit
8e6b951a76
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue