ExOxvif.Error exception (ex_oxvif v0.1.0)

Copy Markdown View Source

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

Summary

Types

kind()

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

t()

@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
}