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

Open
opened 2026-04-15 22:41:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8650
Author: @himself65
Created: 3/17/2026
Status: 🔄 Open

Base: mainHead: fix/8549-scim-patch-noop


📝 Commits (1)

  • 6353b61 fix(scim): return 204 instead of 400 for no-op PATCH requests (#8549)

📊 Changes

2 files changed (+44 additions, -75 deletions)

View changed files

📝 packages/scim/src/routes.ts (+2 -3)
📝 packages/scim/src/scim-patch.test.ts (+42 -72)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8650 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/17/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/8549-scim-patch-noop` --- ### 📝 Commits (1) - [`6353b61`](https://github.com/better-auth/better-auth/commit/6353b61bd82cfa19a4337e6a381124461287fede) fix(scim): return 204 instead of 400 for no-op PATCH requests (#8549) ### 📊 Changes **2 files changed** (+44 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `packages/scim/src/routes.ts` (+2 -3) 📝 `packages/scim/src/scim-patch.test.ts` (+42 -72) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:41:37 -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#25020