An exception for when a server is unreachable.
The :request and :reason fields are omitted from Inspect output as
they may contain sensitive data.
Fields
:http_adapter- the HTTP adapter module:request- the HTTP request:reason- the underlying failure reason
Examples
iex> error = %Assent.HTTPAdapter.ServerUnreachableError{
...> http_adapter: Assent.HTTPAdapter.Httpc,
...> request: %Assent.HTTPAdapter.HTTPRequest{method: :get, url: "https://example.com"},
...> reason: :timeout
...> }
iex> Exception.message(error)
"server is unreachable\n\nHTTP adapter: Assent.HTTPAdapter.Httpc\nRequest: GET https://example.com\n"
iex> inspect(error)
"#Assent.HTTPAdapter.ServerUnreachableError<http_adapter: Assent.HTTPAdapter.Httpc, ...>"
Summary
Functions
Callback implementation for Exception.message/1.
Types
@type t() :: %Assent.HTTPAdapter.ServerUnreachableError{ __exception__: term(), http_adapter: module(), reason: term(), request: Assent.HTTPAdapter.HTTPRequest.t() }
Functions
Callback implementation for Exception.message/1.