class HTTP::Client::StatusError < HTTP::Client::Error
A response that is not 2xx, from Response#ensure_success. An
exception is Shareable and a response's body is not, so it carries
the response's status, headers and URL, and its body when it could
be read (up to max_body_bytes). The message says the status and
the URL, never the body.
Class methods
def self.new(status: Int, headers: HTTP::Headers, url: URI, body: Bytes?) -> HTTP::Client::StatusError
An exception with message, not yet raised.
from Exception
Methods
def status -> Int
The response's status.
def headers -> HTTP::Headers
The response's headers.
def url -> URI
The URL that answered.
def body -> Bytes?
The response's body, nil when it could not be read.