MillionSend.Error exception (MillionSend v0.5.0)

Copy Markdown View Source

The error every non-2xx response carries, plus the client-side/transport case.

name is the stable snake_case discriminant you can match on ("validation_error", "not_found", "restricted_api_key", …). status_code is nil when the request never reached the API (a transport failure).

Summary

Types

t()

@type t() :: %MillionSend.Error{
  __exception__: true,
  message: String.t(),
  name: String.t(),
  status_code: non_neg_integer() | nil
}