refactor(core): Skip sending webhook activation errors to Sentry (no-changelog) (#7171)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-09-27 16:57:52 +02:00
committed by GitHub
parent 07d072c28f
commit ebce6fe1b0
5 changed files with 23 additions and 16 deletions

View File

@@ -104,7 +104,7 @@ const STATUS_CODE_MESSAGES: IStatusCodeMessages = {
const UNKNOWN_ERROR_MESSAGE = 'UNKNOWN ERROR - check the detailed error for more information';
const UNKNOWN_ERROR_MESSAGE_CRED = 'UNKNOWN ERROR';
type Severity = 'warning' | 'error';
export type Severity = 'warning' | 'error';
interface ExecutionBaseErrorOptions {
cause?: Error | JsonObject;
@@ -136,6 +136,8 @@ export abstract class ExecutionBaseError extends Error {
lineNumber: number | undefined;
severity: Severity = 'error';
constructor(message: string, { cause }: ExecutionBaseErrorOptions) {
const options = cause instanceof Error ? { cause } : {};
super(message, options);
@@ -171,8 +173,6 @@ export abstract class ExecutionBaseError extends Error {
export abstract class NodeError extends ExecutionBaseError {
node: INode;
severity: Severity = 'error';
constructor(node: INode, error: Error | JsonObject) {
const message = error instanceof Error ? error.message : '';
super(message, { cause: error });