https://github.com/user-attachments/assets/c0a42726-50ac-496e-a993-9d6076a84a6a --------- Co-authored-by: Félix Malfait <felix@twenty.com>
16 lines
488 B
TypeScript
16 lines
488 B
TypeScript
import { CustomException } from 'src/utils/custom-exception';
|
|
|
|
export class AgentException extends CustomException {
|
|
declare code: AgentExceptionCode;
|
|
constructor(message: string, code: AgentExceptionCode) {
|
|
super(message, code);
|
|
}
|
|
}
|
|
|
|
export enum AgentExceptionCode {
|
|
AGENT_NOT_FOUND = 'AGENT_NOT_FOUND',
|
|
AGENT_EXECUTION_FAILED = 'AGENT_EXECUTION_FAILED',
|
|
API_KEY_NOT_CONFIGURED = 'API_KEY_NOT_CONFIGURED',
|
|
USER_WORKSPACE_ID_NOT_FOUND = 'USER_WORKSPACE_ID_NOT_FOUND',
|
|
}
|