/** * A class of errors specific to the OctoAI TS SDK. */ declare class OctoAIError extends Error { readonly causedBy?: Error; /** * Parent class for OctoAI Errors used by the TS SDK. * * @param message - Message from server or client about cause of error. * @param causedBy - Error code of course error. Usually HTTP errors. */ constructor(message: string, causedBy?: Error); } /** * Client-side validation errors. Problems with request caught before sending. */ export declare class OctoAIValidationError extends OctoAIError { } /** * Client-side errors. Indicated by HTTP codes from 400 through 499. */ export declare class OctoAIClientError extends OctoAIError { } /** * Server-side errors. Indicated by HTTP codes from 500 through 599. */ export declare class OctoAIServerError extends OctoAIError { } /** * Timeout errors that don't necessarily indicate a client or server failure. */ export declare class OctoAITimeoutError extends OctoAIError { } /** * Support method to create errors to throw on failures. * * @param response - the server response that isn't ok. */ export declare function throwOctoAIError(response: Response): Promise; /** * Standardized error message for requiring authorization. */ export declare function throwOctoAITokenRequiredError(): void; export {};