An error produced by tama-dex during Tama.Dex.execute/5.
dispatched says whether the executor was called:
false: the operation did not run. Kinds:not_found,:not_ready,:no_executor,:invalid_inputand:confirmation_required.true: the operation may have taken effect, and must be reconciled rather than retried. Kinds:dispatch_failedand:invalid_output.
An executor's own valid error is not a Tama.Dex.Error. execute/5
returns it as {:error, %{cassette, operation_id, source, operation_error}},
so match %Tama.Dex.Error{} first.
message is at most 256 bytes. details depends on the kind:
| Kind | Details |
|---|---|
:no_executor | %{source: source} |
:invalid_input | %{issues: [%{pointer, message}], issues_truncated: boolean} (at most 16 issues), or %{} when the input isn't a JSON object within 1 MiB |
:confirmation_required | %{field: field, description: description} |
:dispatch_failed | %{exception_kind: :error | :exit | :throw} |
:invalid_output | %{identity: %{name => value}}, the declared x-tama-identity values found in the result |
Errors never carry input values or result content, apart from those identity values.