[PR #3997] [CLOSED] fix(org): use NOT_FOUND for orgs that cant be found #30728

Closed
opened 2026-04-17 21:45:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3997
Author: @ping-maxwell
Created: 8/14/2025
Status: Closed

Base: canaryHead: fix/org/not-found-status


📝 Commits (3)

  • d36c501 fix(org): use NOT_FOUND for orgs that cant be found
  • cbf30f5 Merge branch 'canary' into fix/org/not-found-status
  • 09694f6 Merge branch 'canary' into fix/org/not-found-status

📊 Changes

3 files changed (+16 additions, -10 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+8 -2)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.test.ts (+1 -1)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+7 -7)

📄 Description

Right now we use BAD_REQUEST, for orgs that can't be found. I think NOT_FOUND makes more sense.

https://discord.com/channels/1288403910284935179/1405507215984689153


Summary by cubic

Changed organization-related API errors from BAD_REQUEST (400) to NOT_FOUND (404) when an organization does not exist.

  • Bug Fixes
  • Updated error status codes for missing organizations in invites and organization routes.
  • Adjusted related tests to expect 404 instead of 400 for these cases.

🔄 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/3997 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 8/14/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/org/not-found-status` --- ### 📝 Commits (3) - [`d36c501`](https://github.com/better-auth/better-auth/commit/d36c50115744838a72739a4ffd3488a8d25adc85) fix(org): use NOT_FOUND for orgs that cant be found - [`cbf30f5`](https://github.com/better-auth/better-auth/commit/cbf30f5c89317e2805fcda1260a72db690611d6e) Merge branch 'canary' into fix/org/not-found-status - [`09694f6`](https://github.com/better-auth/better-auth/commit/09694f69248ac9f931d7f99664ca630531ca7d9b) Merge branch 'canary' into fix/org/not-found-status ### 📊 Changes **3 files changed** (+16 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+8 -2) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.test.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+7 -7) </details> ### 📄 Description Right now we use BAD_REQUEST, for orgs that can't be found. I think NOT_FOUND makes more sense. https://discord.com/channels/1288403910284935179/1405507215984689153 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Changed organization-related API errors from BAD_REQUEST (400) to NOT_FOUND (404) when an organization does not exist. - **Bug Fixes** - Updated error status codes for missing organizations in invites and organization routes. - Adjusted related tests to expect 404 instead of 400 for these cases. <!-- End of auto-generated description by cubic. --> --- <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-17 21:45:19 -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#30728