import { RpcResponse } from '../response'; /** * The base class for a connection related error. In case someone wants * to log and handle any connection related issues. */ export declare abstract class RpcConnectionError extends Error { name: string; } /** * Thrown when the connection attempt has failed for any reason. Most * likely because the server is not running, the server is unreachable, * the server is running on a different port, etc... */ export declare class RpcConnectionRefusedError extends RpcConnectionError { } /** Thrown when the connection is lost after you've successfully connected. * * @note In a stateless connection like HTTP this should happen after the request was sent out, but before the response has been returned. * @note In a stateful connection like websockets or IPC, this should be thrown any time after you've connected when the connection has been disconnected unexpectedly. */ export declare class RpcConnectionLostError extends RpcConnectionError { } /** Thrown when a response comes back with a code that is between 400 to 500 */ export declare class RpcRequestError extends Error { name: string; response?: RpcResponse; status: number; code: string; codeMessage: string; codeStack: string | null; constructor(response: RpcResponse, code: string, codeMessage: string, codeStack?: string); } /** Thrown when the request timeout has been exceeded and the request has been aborted */ export declare class RpcRequestTimeoutError extends RpcRequestError { constructor(response: RpcResponse, timeoutMs: number, route: string); } //# sourceMappingURL=errors.d.ts.map