Normalized error for the SDK facade.
The generated openapi-generator client returns three different shapes for
failures (spec-declared error models as {:ok, error_struct}, undeclared
statuses as {:error, %Tesla.Env{}}, and transport failures as
{:error, reason}). normalize/1 collapses all of them into
{:error, %ExDaytona.Error{}} so facade callers match one shape:
status— HTTP status, ornilfor transport failuresmessage— human-readable messagecode— the API's error code string, when it sent onedetails— the raw error payload (decoded map, model struct, or transport reason) for anything the other fields don't capture
Summary
Functions
Build an ExDaytona.Error from any failure shape the generated client
produces.
Collapse a generated-client result into {:ok, value} or
{:error, %ExDaytona.Error{}}.
Types
@type t() :: %ExDaytona.Error{ code: String.t() | nil, details: term(), message: String.t() | nil, status: non_neg_integer() | nil }
Functions
Build an ExDaytona.Error from any failure shape the generated client
produces.
Collapse a generated-client result into {:ok, value} or
{:error, %ExDaytona.Error{}}.
Success values (decoded models, lists, maps, and 2xx Tesla.Env
passthroughs) are left untouched.