Custom error class for REST API errors. Extends JavaScript’s built-in Error
class. Thrown when an HTTP request to the SignalWire REST API returns a non-success
status code. The name property is always "RestError".
Also exported as SignalWireRestError to match the Python SDK class name.
HTTP status code returned by the API (e.g., 404, 422, 500).
Response body from the API. Parsed as JSON when the response was valid
JSON; otherwise the raw text. Matches the Python SDK’s
SignalWireRestError.body behavior.
The URL that was requested.
The HTTP method used ("GET", "POST", "PUT", "PATCH", "DELETE").
Always "RestError".
Human-readable summary: "{method} {url} returned {statusCode}: {body}".