interface CustomErrorOptions { message?: string; details?: string[]; localizedMessage?: string; } interface ErrorResponse { code?: string; message?: string; details: string[]; localizedMessage?: string; } declare class CustomError extends Error { readonly code?: string; readonly details: string[]; readonly localizedMessage?: string; constructor(code?: string, options?: CustomErrorOptions); toResponse(includeDetails?: boolean): ErrorResponse; } declare const isCustomError: (error: unknown) => error is CustomError; declare class BadRequest extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class Conflict extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class Forbidden extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class InternalServerError extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class NotFound extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class NotImplemented extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class ServiceUnavailable extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class TimeOut extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class TooManyRequests extends CustomError { constructor(code: string, options?: CustomErrorOptions); } declare class Unauthorized extends CustomError { constructor(code: string, options?: CustomErrorOptions); } type CustomErrorContext = CustomErrorOptions; export { isCustomError, Unauthorized, TooManyRequests, TimeOut, ServiceUnavailable, NotImplemented, NotFound, InternalServerError, Forbidden, ErrorResponse, CustomErrorOptions, CustomErrorContext, CustomError, Conflict, BadRequest };