AppleIntents.Error exception (apple_intents v0.1.0)

Copy Markdown View Source

Structured errors for App Intents fulfillment.

Summary

Types

code()

@type code() ::
  :invalid_signature
  | :invalid_certificate_chain
  | :invalid_algorithm
  | :invalid_payload
  | :missing_intent
  | :handler_error
  | :unauthorized
  | :dry_run
  | :configuration
  | :approval_required

t()

@type t() :: %AppleIntents.Error{
  __exception__: true,
  code: code() | nil,
  details: term(),
  message: String.t()
}

Functions

from_reason(error)

@spec from_reason(term()) :: t()

new(code, message, details \\ nil)

@spec new(code(), String.t(), term()) :: t()

to_response(error)

@spec to_response(t()) :: map()