Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add action error

Tuan Dang0aff94cfb39c
diff --git a/backend/src/utils/errors.ts b/backend/src/utils/errors.ts
index 49afb217af..ba56114651 100644
--- a/backend/src/utils/errors.ts
+++ b/backend/src/utils/errors.ts
@@ -123,4 +123,14 @@ export const SecretNotFoundError = (error?: Partial<RequestErrorContext>) => new
stack: error?.stack
});
+//* ----->[ACTION ERRORS]<-----
+export const ActionNotFoundError = (error?: Partial<RequestErrorContext>) => new RequestError({
+ logLevel: error?.logLevel ?? LogLevel.ERROR,
+ statusCode: error?.statusCode ?? 404,
+ type: error?.type ?? 'action_not_found_error',
+ message: error?.message ?? 'The requested action was not found',
+ context: error?.context,
+ stack: error?.stack
+});
+
//* ----->[MISC ERRORS]<-----