OptionalcauseOptionalstackStatic OptionalprepareOptional override for formatting stack traces
StaticstackThe HTTP method used in the request.
The HTTP status code of the error.
The HTTP status text associated with the error.
The URL of the request that caused the error.
Represents an HTTP-related error.
Remarks
This error is thrown whenever an HTTP request encounters a non-successful HTTP status code. It includes detailed information about the request, including the status code, status text, URL, HTTP method, and response body.
The
HttpErrorclass masks lengthy non-JSON response bodies for readability in the error message.