# `Opsmaru.Incus.Gateway.Failure`
[🔗](https://github.com/upmaru/opsmaru-incus/blob/v0.1.0/lib/opsmaru/incus/gateway/failure.ex#L1)

A gateway-generated failure, encoded in the native Incus error shape.

`outcome` states what the backend may have seen:

  * `:not_sent` - no request bytes reached the backend.
  * `:uncertain` - request bytes may have reached the backend; a mutation may
    have been accepted. The gateway never retries it.
  * `:sent` - a read-only request was sent and its response failed.

`operation` carries a known native operation URL when one was observed.
Messages are fixed strings; they never include addresses, credentials or
host callback results.

# `t`

```elixir
@type t() :: %Opsmaru.Incus.Gateway.Failure{
  message: term(),
  operation: term(),
  outcome: term(),
  status: term()
}
```

# `encode`

Status, headers and body for a native-shaped error response.

# `new`

---

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