Normalized error constructors used across Arex.
Public helpers return {:error, error_map} tuples where error_map.kind is
suitable for pattern matching and the remaining fields preserve debugging
context from the originating request.
The goal of this module is stability at the API boundary. Callers should be
able to branch on error.kind without parsing raw response payloads, while
still having access to the request metadata and any ArcadeDB-specific detail
that was available.
In practice this means:
- transport errors and ArcadeDB errors share one shape
kindis the main field for pattern matching in application code- request metadata stays attached for observability and debugging
- helper-level validation failures look the same as remote failures
Most application code will not call these constructors directly, but the
module is public so consumers can rely on the documented error shape and the
stable kind vocabulary.
Summary
Types
Metadata about the request that produced the error.
Normalized error map returned by Arex APIs.
Functions
Builds a normalized error map from an ArcadeDB failure response.
Returns an error indicating that call options were invalid.
Returns an error indicating that a database name was required but absent.
Builds a normalized ArcadeDB error map from a response body.
Returns an error indicating that an identifier failed validation.
Returns an error indicating that a query or helper matched too many rows.
Returns an error indicating that a requested entity was not found.
Returns an error indicating that scope cannot be used without tenant.
Returns an error indicating that a transaction was required.
Builds an error map from a transport-layer exception.
Returns an error indicating that a type name was required but absent.
Types
Metadata about the request that produced the error.
@type t() :: %{ kind: atom(), message: String.t(), status: integer() | nil, arcade_code: String.t() | nil, details: any(), body: map(), request: request_meta() }
Normalized error map returned by Arex APIs.
kind is the field intended for pattern matching. The remaining fields carry
human-readable diagnostics and request context.
Functions
Builds a normalized error map from an ArcadeDB failure response.
Returns an error indicating that call options were invalid.
Returns an error indicating that a database name was required but absent.
Builds a normalized ArcadeDB error map from a response body.
Structured bodies contribute error, detail, and exception fields when
they are present. Plain bodies are wrapped into a minimal map so callers still
receive a consistent error shape.
Returns an error indicating that an identifier failed validation.
Returns an error indicating that a query or helper matched too many rows.
Returns an error indicating that a requested entity was not found.
Returns an error indicating that scope cannot be used without tenant.
Returns an error indicating that a transaction was required.
Builds an error map from a transport-layer exception.
Returns an error indicating that a type name was required but absent.