mya-cli
Version:
MYA - AI-Powered Stock & Options Analysis CLI Tool
35 lines (34 loc) • 787 B
TypeScript
/**
* Error interfaces for the application
*/
/**
* Base error interface for model errors
*/
export interface ModelError extends Error {
code: string;
status?: number;
details?: Record<string, unknown>;
}
/**
* Validation error interface
*/
export interface ValidationError extends ModelError {
field: string;
value: unknown;
constraints: Record<string, string>;
}
/**
* Security error interface
*/
export interface SecurityError extends ModelError {
type: 'authentication' | 'authorization' | 'validation';
resource?: string;
action?: string;
}
/**
* Business logic error interface
*/
export interface BusinessError extends ModelError {
category: 'validation' | 'security' | 'data' | 'service';
context?: Record<string, unknown>;
}