NativeArtifact.Error (native_artifact v0.1.0)

Copy Markdown View Source

Structured failures shared by the planned native artifact lifecycle.

code identifies the failure boundary; details contains caller-owned data such as a manifest field path or compatibility requirement. These errors never select source compilation. Callers must redact credentials before logging details, URLs or underlying transport errors.

Summary

Functions

Returns the closed set of failure classifications in this contract.

Constructs a failure without raising, logging or selecting a recovery action.

Types

code()

@type code() ::
  :invalid_manifest
  | :unsupported_schema
  | :unsupported_artifact_kind
  | :unknown_target
  | :unsupported_target
  | :incompatible_artifact
  | :ambiguous_artifact
  | :artifact_not_found
  | :network_failed
  | :auth_failed
  | :tls_failed
  | :header_limit_exceeded
  | :checksum_mismatch
  | :unsafe_archive
  | :offline_cache_miss
  | :build_tool_missing
  | :load_failed
  | :invalid_configuration

t()

@type t() :: %NativeArtifact.Error{code: code(), details: map()}

Functions

codes()

@spec codes() :: [code()]

Returns the closed set of failure classifications in this contract.

new(code, details \\ %{})

@spec new(code(), map()) :: t()

Constructs a failure without raising, logging or selecting a recovery action.