/** * Custom error class for REST API errors. * * `body` may be a parsed JSON object (when the server returned valid JSON) * or a plain string (when JSON parsing failed), matching the Python SDK's * `SignalWireRestError` behavior. */ export declare class RestError extends Error { /** HTTP status code returned by the server (e.g. `404`, `500`). */ readonly statusCode: number; /** * Parsed response body. An object when the server returned valid JSON, * otherwise the raw response text as a string. */ readonly body: string | Record; /** Fully-qualified URL that produced the error. */ readonly url: string; /** HTTP method that produced the error (`GET`, `POST`, etc.). */ readonly method: string; /** * @param statusCode - HTTP status code returned by the server. * @param body - Response body — an object if JSON-parseable, otherwise the * raw response text. * @param url - Fully-qualified URL that produced the error. * @param method - HTTP method that produced the error. Defaults to `"GET"`. */ constructor(statusCode: number, body: string | Record, url: string, method?: string); } /** Alias matching the Python SDK class name. */ export { RestError as SignalWireRestError };