SCIM error response functions for Phoenix controllers.
This module bridges core SCIM error logic from ExScim.Error with Phoenix HTTP responses, providing functions that controllers can import to send RFC 7644 compliant error responses.
Summary
Functions
Sends a SCIM-compliant error response using core ExScim.Error logic.
Sends a SCIM error response based on HTTP status code using core ExScim.Error logic.
Sends a SCIM validation error list response using core ExScim.Error logic.
Functions
@spec send_scim_error(Plug.Conn.t(), atom() | integer(), atom(), String.t()) :: Plug.Conn.t()
Sends a SCIM-compliant error response using core ExScim.Error logic.
status- can be an atom (:bad_request) or integer (400)scim_type- SCIM error type atom from ExScim.Error.scim_type()detail- human-readable error description
@spec send_scim_error_from_status(Plug.Conn.t(), atom() | integer()) :: Plug.Conn.t()
Sends a SCIM error response based on HTTP status code using core ExScim.Error logic.
@spec send_validation_errors(Plug.Conn.t(), [map()]) :: Plug.Conn.t()
Sends a SCIM validation error list response using core ExScim.Error logic.
Each error must be a map with:
"path"- the SCIM attribute path"message"- the error message