# `Assent.HTTPAdapter.InvalidResponseError`
[🔗](https://github.com/pow-auth/assent/blob/v0.4.0/lib/assent/http_adapter.ex#L129)

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<...>"

# `t`

```elixir
@type t() :: %Assent.HTTPAdapter.InvalidResponseError{
  __exception__: term(),
  response: Assent.HTTPAdapter.HTTPResponse.t()
}
```

# `message`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
