Pixir.Provider.TransportError (pixir v0.1.12)

Copy Markdown View Source

Secret-safe classification for failures crossing the Provider transport boundary.

Transport failures may contain request arguments, stack frames, headers, endpoint paths, or arbitrary adapter terms. This module deliberately projects only a small, fixed vocabulary; callers must never inspect/1 an untrusted transport reason into an error, Log, diagnostic, or Provider metadata field.

Summary

Functions

Project an arbitrary transport return into a bounded structured error.

Return a bounded reason atom without retaining arbitrary failure data.

Functions

project(error, opts \\ [])

@spec project(
  term(),
  keyword()
) :: map()

Project an arbitrary transport return into a bounded structured error.

reason(reason)

@spec reason(term()) :: atom()

Return a bounded reason atom without retaining arbitrary failure data.