/** * Type definitions for API errors */ /** * Custom error class with structured data. Subclasses name the error category; * `name` is the subclass name. */ export declare class ErrorWithData extends Error { readonly data: Record; constructor(message: string, data?: Record, options?: ErrorOptions); toJSON(): { name: string; message: string; data: Record; stack: string | undefined; cause: unknown; }; } /** The service is unavailable: retry once the callee is healthy. */ export declare class UnavailableError extends ErrorWithData { } /** An operation was interrupted: stop the interruption. */ export declare class InterruptedError extends ErrorWithData { } /** The system is busy or overloaded: back off and retry. */ export declare class BusyError extends ErrorWithData { } /** The caller sent incorrect information: the caller needs fixing (not retryable). */ export declare class IncorrectError extends ErrorWithData { } /** Access is forbidden: the caller needs proper credentials (not retryable). */ export declare class ForbiddenError extends ErrorWithData { } /** The operation is not supported: use a different verb (not retryable). */ export declare class UnsupportedError extends ErrorWithData { } /** The resource was not found: reference a different noun (not retryable). */ export declare class NotFoundError extends ErrorWithData { } /** Conflict with the callee's state: the systems need to coordinate (not retryable). */ export declare class ConflictError extends ErrorWithData { } /** Internal fault on the callee side: fixing the callee may help (potentially retryable). */ export declare class FaultError extends ErrorWithData { } /** Unknown error: may be retryable depending on the cause. */ export declare class UnknownError extends ErrorWithData { } //# sourceMappingURL=types.d.ts.map