feat(scim): render SCIM errors in RFC 7644 form - #2661
Open
xlgmokha wants to merge 1 commit into
Open
Conversation
Add the error message form from RFC 7644, and teach `HandleResponseError` to render it, so a handler under `/scim/v2` can answer with a SCIM error by returning one. The router grows `NotFound` and `MethodNotAllowed` hooks. The SCIM server uses them to answer an unknown endpoint with a 404 and an unsupported method with a 405 carrying an Allow header, and the not-implemented stubs return the same form instead of an empty body. Errors are served as `application/scim+json`. With the flag off the routes still answer with the ordinary 404.
xlgmokha
force-pushed
the
xlgmokha/auth-1362c
branch
from
July 30, 2026 22:44
9a55516 to
f36851b
Compare
xlgmokha
marked this pull request as ready for review
July 30, 2026 22:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature. Adds the RFC-7644 error form and returns it from the SCIM endpoints, so failures under
/scim/v2answer in the shape a SCIM client expects.Extracted from: #2643
What is the current behavior?
Nothing under
/scim/v2produces a SCIM error. The discovery endpoints return a bare 501 with an empty body, an unknown path under/scim/v2falls to a plaintext 404, and a POST to a discovery endpoint gets a plaintext 405.What is the new behavior?
Adds the error message form from RFC-7644 and renders it as
application/scim+json.Handlers can now send a SCIM error by returning one.
GET /scim/v2/Unknown-> 404 in SCIM formPOST|PUT|PATCH|DELETEon a discovery endpoints -> 405 in SCIM form, withAllow: GETExample:
$ curl -i http://localhost:9999/scim/v2/Unknown HTTP/1.1 404 Not Found Content-Type: application/scim+json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "detail": "Endpoint or resource does not exist", "status": "404" }With
GOTRUE_EXPERIMENTAL_SCIM_ENABLEDunset, the routes still answer with the ordinary 404 (feature_disabled) rather than a SCIM error.Additional context