26 lines
760 B
TypeScript
26 lines
760 B
TypeScript
/**
|
|
* Standardized error codes for IPC communication
|
|
* These are used instead of string messages for better error handling
|
|
*/
|
|
export enum ErrorCode {
|
|
// General errors
|
|
UNKNOWN_ERROR = 'UNKNOWN_ERROR',
|
|
INVALID_REQUEST = 'INVALID_REQUEST',
|
|
|
|
// Process errors
|
|
PROCESS_NOT_FOUND = 'PROCESS_NOT_FOUND',
|
|
PROCESS_ALREADY_EXISTS = 'PROCESS_ALREADY_EXISTS',
|
|
PROCESS_START_FAILED = 'PROCESS_START_FAILED',
|
|
PROCESS_STOP_FAILED = 'PROCESS_STOP_FAILED',
|
|
|
|
// Daemon errors
|
|
DAEMON_NOT_RUNNING = 'DAEMON_NOT_RUNNING',
|
|
DAEMON_ALREADY_RUNNING = 'DAEMON_ALREADY_RUNNING',
|
|
|
|
// Memory errors
|
|
MEMORY_LIMIT_EXCEEDED = 'MEMORY_LIMIT_EXCEEDED',
|
|
|
|
// Config errors
|
|
CONFIG_INVALID = 'CONFIG_INVALID',
|
|
CONFIG_SAVE_FAILED = 'CONFIG_SAVE_FAILED',
|
|
} |