# `Alternera.Plugin.Error`
[🔗](https://github.com/10e-ab/alternera-sdk/blob/v0.9.0/alternera_plugin_sdk/lib/alternera/plugin/error.ex#L1)

What a plugin needs to know about a step's failure before it raises one:
the rule for an error type and the cap on a failed call's response body.
The error itself, with the pipeline's own types and what the runner
records, is `Pipelines.Runner.Error`, which takes both from here.

# `max_body_bytes`

```elixir
@spec max_body_bytes(pos_integer() | nil) :: pos_integer()
```

The most of a failed call's response body an error keeps (`response`'s
`"body"`): the tenant's `body_inspect_max_bytes`, at most 1 MiB.

# `valid_type?`

```elixir
@spec valid_type?(term()) :: boolean()
```

Whether `type` is a valid error type: a slug of lowercase letters,
digits, `-` and `_`, starting with a letter or digit, at most 64
characters.

---

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