An exception for when an HTTP response is invalid.
The :response field is omitted from Inspect output as it may contain
sensitive data.
Fields
:response- the normalized HTTP response
Examples
iex> error = %Assent.HTTPAdapter.InvalidResponseError{
...> response: %Assent.HTTPAdapter.HTTPResponse{
...> request: %Assent.HTTPAdapter.HTTPRequest{method: :get, url: "https://example.com"},
...> http_adapter: Assent.HTTPAdapter.Httpc,
...> status: 500,
...> body: "Internal Server Error"
...> }
...> }
iex> Exception.message(error)
"invalid response\n\nHTTP adapter: Assent.HTTPAdapter.Httpc\nRequest: GET https://example.com\nResponse status: 500\n"
iex> inspect(error)
"#Assent.HTTPAdapter.InvalidResponseError<...>"
Summary
Functions
Callback implementation for Exception.message/1.
Types
@type t() :: %Assent.HTTPAdapter.InvalidResponseError{ __exception__: term(), response: Assent.HTTPAdapter.HTTPResponse.t() }
Functions
Callback implementation for Exception.message/1.