fix(core): Do not report generic webhook execution errors (no-changelog) (#8749)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-27 12:36:49 +01:00
committed by GitHub
parent 3cbe1e2136
commit 5f6da7b84e

View File

@@ -34,6 +34,7 @@ import type {
WorkflowExecuteMode, WorkflowExecuteMode,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { import {
ApplicationError,
BINARY_ENCODING, BINARY_ENCODING,
createDeferredPromise, createDeferredPromise,
ErrorReporterProxy as ErrorReporter, ErrorReporterProxy as ErrorReporter,
@@ -807,7 +808,13 @@ export async function executeWebhook(
}) })
.catch((e) => { .catch((e) => {
if (!didSendResponse) { if (!didSendResponse) {
responseCallback(new Error('There was a problem executing the workflow'), {}); responseCallback(
new ApplicationError('There was a problem executing the workflow', {
level: 'warning',
cause: e,
}),
{},
);
} }
throw new InternalServerError(e.message); throw new InternalServerError(e.message);
@@ -818,7 +825,10 @@ export async function executeWebhook(
const error = const error =
e instanceof UnprocessableRequestError e instanceof UnprocessableRequestError
? e ? e
: new Error('There was a problem executing the workflow', { cause: e }); : new ApplicationError('There was a problem executing the workflow', {
level: 'warning',
cause: e,
});
if (didSendResponse) throw error; if (didSendResponse) throw error;
responseCallback(error, {}); responseCallback(error, {});
return; return;