ExIncus. Error exception
(ex_incus v1.0.0)
Copy Markdown
Error returned by any ExIncus function.
All API functions return {:error, %ExIncus.Error{}} on failure. The struct
is also an exception, so it can be raised directly:
case ExIncus.Instances.get(client, "web1") do
{:ok, instance} -> instance
{:error, error} -> raise error
endFields
:message- human readable description of the error:code- the Incus error code (usually mirrors the HTTP status, e.g.404), or an operation status code (e.g.400for a failed background operation).nilfor transport-level errors.:http_status- the HTTP status of the response, if a response was received:reason- the underlying cause: the transport exception (e.g.%Mint.TransportError{}), the failedExIncus.Operation, or the raw response body