# `PhoenixKitManufacturing.Errors`
[🔗](https://github.com/BeamLabEU/phoenix_kit_manufacturing/blob/0.4.1/lib/phoenix_kit_manufacturing/errors.ex#L1)

Central mapping from error atoms (returned by the Manufacturing module's
public API and used across its LiveViews) to translated human-readable
strings.

Keeping UI-facing copy in one place means every "not found" or "delete
failed" flash reads the same wording. Callers pattern-match on atoms;
`message/1` wraps each mapping in `gettext/1` at the UI boundary.

## Supported reason shapes

  * plain atoms — `:machine_not_found`, `:type_assignment_failed`, etc.
  * strings — passed through unchanged
  * anything else — rendered as `"Unexpected error: <inspect>"`

## Example

    iex> PhoenixKitManufacturing.Errors.message(:machine_not_found)
    "Machine not found."

# `message`

```elixir
@spec message(term()) :: String.t()
```

Translates an error reason into a user-facing string via gettext.

---

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