Files
gridpilot.gg/core/shared/errors/ApplicationError.ts
2025-12-16 21:05:01 +01:00

20 lines
527 B
TypeScript

/**
* @deprecated Use ApplicationErrorCode in Result instead of throwing ApplicationError.
*/
export type CommonApplicationErrorKind =
| 'not_found'
| 'forbidden'
| 'conflict'
| 'validation'
| 'unknown'
| string;
/**
* @deprecated Use ApplicationErrorCode in Result instead of throwing ApplicationError.
*/
export interface ApplicationError<K extends string = CommonApplicationErrorKind, D = unknown> extends Error {
readonly type: 'application';
readonly context: string;
readonly kind: K;
readonly details?: D;
}