# `NativeArtifact.Error`
[🔗](https://github.com/gsmlg-dev/native_artifact/blob/main/lib/native_artifact/error.ex#L1)

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.

# `code`

```elixir
@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`

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

# `codes`

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

Returns the closed set of failure classifications in this contract.

# `new`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
