Managoat.Sandbox.Sprites.Errors (managoat_sandbox v0.2.0)

Copy Markdown View Source

Normalizes sprites-ex error shapes into the Managoat.Sandbox taxonomy.

The SDK surfaces HTTP failures as {:api_error, status, body} (plus {:not_found, body} from the get endpoint), a socket that closed before the command's exit frame as :closed_before_exit, and other transport failures as whatever Req produced. Nothing outside the Sprites adapter should ever see those shapes — Managoat.Sandbox.Retry.transient?/1 and the not-found handling in the wake path classify on the normalized terms only.

Summary

Functions

Map a raw sprites-ex error reason onto Managoat.Sandbox.error/0.

Functions

normalize(e)

@spec normalize(term()) :: Managoat.Sandbox.error()

Map a raw sprites-ex error reason onto Managoat.Sandbox.error/0.