# `Ollixir.ResponseError`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L1)

Exception raised for API response errors.

This error is raised when the Ollama API returns an error response.
It includes both the HTTP status code and the API error message.

# `t`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L11)

```elixir
@type t() :: %Ollixir.ResponseError{
  __exception__: true,
  body: map() | String.t() | nil,
  error: String.t() | nil,
  message: String.t(),
  status: integer()
}
```

# `client_error?`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L55)

```elixir
@spec client_error?(t()) :: boolean()
```

Check if error is a client error (4xx).

# `from_response`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L47)

```elixir
@spec from_response(Req.Response.t() | map()) :: t()
```

Create from HTTP response.

# `not_found?`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L67)

```elixir
@spec not_found?(t()) :: boolean()
```

Check if error indicates model not found.

# `retryable?`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L81)

```elixir
@spec retryable?(t()) :: boolean()
```

Check if error is retryable.

# `server_error?`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L61)

```elixir
@spec server_error?(t()) :: boolean()
```

Check if error is a server error (5xx).

# `unauthorized?`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/response_error.ex#L74)

```elixir
@spec unauthorized?(t()) :: boolean()
```

Check if error indicates unauthorized.

---

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