Raised/returned for any non-2xx MailKite API response.
:status— the HTTP status code.:message— the API'serrorfield when present, otherwise"HTTP <status>".:body— the parsed response body (any JSON value), for inspection.
MailKite.Client.request/4 returns {:error, %MailKite.Error{}}; the struct is
also an exception, so you may raise it when you prefer exception-style flow.
Summary
Types
@type t() :: %MailKite.Error{ __exception__: true, body: any(), message: String.t() | nil, status: non_neg_integer() | nil }