# `ExOxvif.Error`
[🔗](https://github.com/cortfritz/ex_oxvif/blob/v0.1.0/lib/ex_oxvif/error.ex#L1)

An error returned by any `ExOxvif` call.

`:kind` is one of:

  * `:http` - the request failed below HTTP (connect, TLS, timeout)
  * `:http_status` - the device answered with a non-2xx status; see `:status`
    and `:detail` (the response body)
  * `:soap_fault` - the device returned a SOAP fault; see `:code`,
    `:reason`, `:subcode` and `:detail`. Authentication failures usually
    arrive this way, with a `NotAuthorized` subcode.
  * `:xml_parse`, `:missing_body`, `:missing_field`, `:unexpected_response`,
    `:invalid_value` - the response could not be understood
  * `:invalid_argument` - oxvif rejected an argument before sending
  * `:io` - a local socket error (discovery)
  * `:timeout` - no reply within the call's `:timeout`
  * `:panic` - the native code panicked; please report it

# `kind`

```elixir
@type kind() ::
  :http
  | :http_status
  | :soap_fault
  | :xml_parse
  | :missing_body
  | :missing_field
  | :unexpected_response
  | :invalid_value
  | :invalid_argument
  | :io
  | :timeout
  | :panic
```

# `t`

```elixir
@type t() :: %ExOxvif.Error{
  __exception__: true,
  code: String.t() | nil,
  detail: String.t() | nil,
  kind: kind(),
  message: String.t(),
  reason: String.t() | nil,
  status: non_neg_integer() | nil,
  subcode: String.t() | nil
}
```

---

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