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:
Iván Ovejero 2023-12-19 16:11:21 +01:00 committed by GitHub
parent 9d22c7a278
commit 8e6b951a76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ import type {
IExecutionsSummary,
IN8nUISettings,
} from 'n8n-workflow';
import { ApplicationError, jsonParse } from 'n8n-workflow';
import { jsonParse } from 'n8n-workflow';
// @ts-ignore
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);
if (!job) {
throw new ApplicationError('Could not stop job because it is no longer in queue.', {
extra: { jobId: req.params.id },
this.logger.debug('Could not stop job because it is no longer in queue', {
jobId: req.params.id,
});
} else {
await queue.stopJob(job);