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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,7 @@ import type {
WorkflowExecuteMode,
} from 'n8n-workflow';
import {
ApplicationError,
BINARY_ENCODING,
createDeferredPromise,
ErrorReporterProxy as ErrorReporter,
@ -807,7 +808,13 @@ export async function executeWebhook(
})
.catch((e) => {
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);
@ -818,7 +825,10 @@ export async function executeWebhook(
const error =
e instanceof UnprocessableRequestError
? 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;
responseCallback(error, {});
return;