Files
twenty/packages/twenty-server/src/engine/metadata-modules/route-trigger/exceptions/route-trigger.exception.ts
T
martmull 11564f135e Fix env not optional + serverless logging (#15186)
Several fixes after discussing with @BOHEUS 
- set applicationManifest env key optional
- fix server local serverless function logging (introduces a new env
variable `SERVERLESS_LOGS_ENABLED` defaulting to false)
2025-10-20 15:06:26 +02:00

20 lines
726 B
TypeScript

import { CustomException } from 'src/utils/custom-exception';
export class RouteTriggerException extends CustomException {
code: RouteTriggerExceptionCode;
constructor(message: string, code: RouteTriggerExceptionCode) {
super(message, code);
}
}
export enum RouteTriggerExceptionCode {
WORKSPACE_NOT_FOUND = 'WORKSPACE_NOT_FOUND',
ROUTE_NOT_FOUND = 'ROUTE_NOT_FOUND',
TRIGGER_NOT_FOUND = 'TRIGGER_NOT_FOUND',
SERVERLESS_FUNCTION_NOT_FOUND = 'SERVERLESS_FUNCTION_NOT_FOUND',
ROUTE_ALREADY_EXIST = 'ROUTE_ALREADY_EXIST',
ROUTE_PATH_ALREADY_EXIST = 'ROUTE_PATH_ALREADY_EXIST',
FORBIDDEN_EXCEPTION = 'FORBIDDEN_EXCEPTION',
SERVERLESS_FUNCTION_EXECUTION_ERROR = 'SERVERLESS_FUNCTION_EXECUTION_ERROR',
}