AshScim.Error (ash_scim v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

Build a SCIM error envelope.

Types

scim_type()

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

Functions

build(status, detail, scim_type \\ nil)

@spec build(non_neg_integer(), String.t(), scim_type() | nil) :: %{
  required(String.t()) => term()
}

Build a SCIM error envelope.