UNPKG

@centure/node-sdk

Version:

A Typescript SDK for interacting with Centure's API

50 lines 1.52 kB
import { ApiErrorResponse } from "./types"; /** * Base error class for Centure API errors */ export declare class CentureApiError extends Error { /** * HTTP status code */ readonly statusCode: number; /** * Original error response from the API */ readonly response?: ApiErrorResponse; /** * Request ID if available */ readonly requestId?: string; constructor(message: string, statusCode: number, response?: ApiErrorResponse, requestId?: string); } /** * Error thrown when the request is invalid (400) */ export declare class BadRequestError extends CentureApiError { constructor(message: string, response?: ApiErrorResponse, requestId?: string); } /** * Error thrown when authentication fails (401) */ export declare class UnauthorizedError extends CentureApiError { constructor(message: string, response?: ApiErrorResponse, requestId?: string); } /** * Error thrown when the payload is too large (413) */ export declare class PayloadTooLargeError extends CentureApiError { constructor(message: string, response?: ApiErrorResponse, requestId?: string); } /** * Error thrown when the server encounters an error (500) */ export declare class InternalServerError extends CentureApiError { constructor(message: string, response?: ApiErrorResponse, requestId?: string); } /** * Error thrown when the API key is missing */ export declare class MissingApiKeyError extends Error { constructor(); } //# sourceMappingURL=errors.d.ts.map