Optionalbody: unknownOptionalurl: stringOptionalmethod: stringOptional ReadonlybodyThe full parsed JSON response body, when available.
Optional ReadonlycodeApplication error code from the response body, if present.
E.g. "INSUFFICIENT_FUNDS", "CALL_EXCEPTION".
Optional ReadonlymethodThe HTTP method (e.g. GET, POST), when available.
OptionalstackReadonlystatusHTTP status code (e.g. 500, 404).
Optional ReadonlyurlThe request URL, when available.
Thrown when an API request returns a non-ok HTTP status.
Surfaces the parsed response body so callers can inspect
.codeand.message(e.g.codeINSUFFICIENT_FUNDSfor insufficient-gas style failures) without losing the raw response.When the API returns a 403 status, an InsufficientPermissions instance is returned instead, indicating the caller lacks the required permissions for the requested action.
Example: Handling API failures