[PR #8650] fix(scim): return 204 instead of 400 for no-op PATCH requests #16366

Open
opened 2026-04-13 10:30:16 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/8650

State: open
Merged: No


Summary

  • Per RFC 7644, a SCIM PATCH request that results in no changes should return 204 No Content, not 400 Bad Request
  • Previously, when an IDP sent a patch request on a user whose data was already up-to-date, the endpoint returned 400 "No valid fields to update"
  • Now returns 204 for no-op patches (value unchanged, unknown fields, empty operations)

Closes #8549

Test plan

  • All 19 SCIM patch tests pass
  • Send a SCIM PATCH with a value that already exists — should return 204
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8650 **State:** open **Merged:** No --- ## Summary - Per RFC 7644, a SCIM PATCH request that results in no changes should return 204 No Content, not 400 Bad Request - Previously, when an IDP sent a patch request on a user whose data was already up-to-date, the endpoint returned `400 "No valid fields to update"` - Now returns 204 for no-op patches (value unchanged, unknown fields, empty operations) Closes #8549 ## Test plan - [x] All 19 SCIM patch tests pass - Send a SCIM PATCH with a value that already exists — should return 204
GiteaMirror added the pull-request label 2026-04-13 10:30:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16366