# `AshScim.Error`
[🔗](https://github.com/ash-project/ash_scim/blob/main/lib/ash_scim/error.ex#L5)

Builders for SCIM 2.0 error response bodies (RFC 7644 §3.12).

All errors share the same envelope shape:

    {
      "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
      "status": "404",
      "scimType": "...",
      "detail": "..."
    }

`scimType` is required by the spec for some HTTP statuses (notably 400) and
optional otherwise.

# `scim_type`

```elixir
@type scim_type() ::
  :invalidFilter
  | :tooMany
  | :uniqueness
  | :mutability
  | :invalidSyntax
  | :invalidPath
  | :noTarget
  | :invalidValue
  | :invalidVers
  | :sensitive
```

# `build`

```elixir
@spec build(non_neg_integer(), String.t(), scim_type() | nil) :: %{
  required(String.t()) =&gt; term()
}
```

Build a SCIM error envelope.

---

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