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

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

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

State: closed
Merged: No


Summary

  • Per RFC 7644, a SCIM PATCH request that results in no changes (e.g., value already exists, unknown fields, empty operations) should return 204 No Content instead of 400 Bad Request.
  • This fixes issues where identity providers (IDPs) send patch requests on users whose data is already up-to-date, which previously caused spurious 400 errors.
  • Updated 3 related tests to expect 204 success instead of 400 errors.

Closes #8549

Test plan

  • All 19 tests in packages/scim/src/scim-patch.test.ts pass
  • Build succeeds
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8646 **State:** closed **Merged:** No --- ## Summary - Per RFC 7644, a SCIM PATCH request that results in no changes (e.g., value already exists, unknown fields, empty operations) should return **204 No Content** instead of **400 Bad Request**. - This fixes issues where identity providers (IDPs) send patch requests on users whose data is already up-to-date, which previously caused spurious 400 errors. - Updated 3 related tests to expect 204 success instead of 400 errors. Closes #8549 ## Test plan - [x] All 19 tests in `packages/scim/src/scim-patch.test.ts` pass - [x] Build succeeds
GiteaMirror added the pull-request label 2026-04-13 10:30:12 -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#16362