Structure for standardized application errors.

export interface AppError {
type: ErrorType;
message: string;
originalError?: unknown;
code?: string;
recoveryAction?: ErrorRecoveryAction;
recoveryMessage?: string;
}
interface AppError {
    type: ErrorType;
    message: string;
    originalError?: unknown;
    code?: string;
    recoveryAction?: ErrorRecoveryAction;
    recoveryMessage?: string;
}

Properties

type: ErrorType
message: string
originalError?: unknown
code?: string
recoveryAction?: ErrorRecoveryAction
recoveryMessage?: string