@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
48 lines • 2.05 kB
TypeScript
/**
* Hard Stop Error Class
* @description Represents unrecoverable errors that require user intervention
*
* Used for scenarios where the system cannot proceed without explicit user input:
* - Entity already exists (duplicate keys)
* - Required references not found
* - Foreign key constraint violations
* - Critical validation failures
*
* @author Optimizely MCP Server
* @version 1.0.0
*/
export declare class HardStopError extends Error {
readonly code: string;
readonly reason: string;
readonly nextAction: "ASK_USER" | "CONTACT_SUPPORT";
readonly httpStatus: number;
readonly forbiddenActions: string[];
readonly fatal: boolean;
constructor(code: string, reason: string, message: string, nextAction?: "ASK_USER" | "CONTACT_SUPPORT", httpStatus?: number, forbiddenActions?: string[]);
/**
* Convert to response format
*/
toResponse(): any;
}
/**
* Common hard stop error types
*/
export declare const HardStopErrorType: {
readonly ENTITY_ALREADY_EXISTS: "ENTITY_ALREADY_EXISTS";
readonly FOREIGN_KEY_CONSTRAINT: "FOREIGN_KEY_CONSTRAINT";
readonly REQUIRED_REFERENCE_MISSING: "REQUIRED_REFERENCE_MISSING";
readonly DATABASE_CONSTRAINT_VIOLATION: "DATABASE_CONSTRAINT_VIOLATION";
readonly QUOTA_EXCEEDED: "QUOTA_EXCEEDED";
readonly INVALID_PROJECT_STATE: "INVALID_PROJECT_STATE";
readonly PLATFORM_ARCHITECTURE_MISMATCH: "PLATFORM_ARCHITECTURE_MISMATCH";
readonly ZOD_VALIDATION_ERROR: "ZOD_VALIDATION_ERROR";
readonly ENTITY_TYPE_MISMATCH: "ENTITY_TYPE_MISMATCH";
readonly DATABASE_SCHEMA_ERROR: "DATABASE_SCHEMA_ERROR";
readonly PROJECT_TYPE_AMBIGUOUS: "PROJECT_TYPE_AMBIGUOUS";
readonly INVALID_PLATFORM_VALUE: "INVALID_PLATFORM_VALUE";
readonly INVALID_ENUM_VALUE: "INVALID_ENUM_VALUE";
readonly PAGINATION_BYPASS_LIMIT_EXCEEDED: "PAGINATION_BYPASS_LIMIT_EXCEEDED";
readonly CONSENT_REQUIRED: "CONSENT_REQUIRED";
readonly OPERATION_NOT_SUPPORTED: "OPERATION_NOT_SUPPORTED";
};
//# sourceMappingURL=HardStopError.d.ts.map