RestError
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".
Properties
statusCode
HTTP status code returned by the API (e.g., 404, 422, 500).
body
Raw response body from the API.
url
The URL that was requested.
method
The HTTP method used ("GET", "POST", "PUT", "PATCH", "DELETE").
name
Always "RestError".
message
Human-readable summary: "{method} {url} returned {statusCode}: {body}".