Structure for standardized application errors.

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

Properties

type: ErrorType
message: string
originalError?: unknown
code?: string