[PR #4024] [MERGED] fix: throw proper error if session is null while deleting organization #30742

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4024
Author: @Kinfe123
Created: 8/15/2025
Status: Merged
Merged: 8/15/2025
Merged by: @Kinfe123

Base: canaryHead: fix/org-delete-throwing-error


📝 Commits (2)

  • fa9cb25 fix: throw a proper error on failed session
  • 962dc64 Merge branch 'canary' into fix/org-delete-throwing-error

📊 Changes

1 file changed (+2 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+2 -3)

📄 Description

closes #4022

Summary by cubic

Now returns a proper unauthorized error when trying to delete an organization without a valid session.


🔄 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/4024 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/15/2025 **Status:** ✅ Merged **Merged:** 8/15/2025 **Merged by:** [@Kinfe123](https://github.com/Kinfe123) **Base:** `canary` ← **Head:** `fix/org-delete-throwing-error` --- ### 📝 Commits (2) - [`fa9cb25`](https://github.com/better-auth/better-auth/commit/fa9cb25ff748bedecea51471d47262c860e618e3) fix: throw a proper error on failed session - [`962dc64`](https://github.com/better-auth/better-auth/commit/962dc6492e53b6e9aa265b055e21128d8c001e3d) Merge branch 'canary' into fix/org-delete-throwing-error ### 📊 Changes **1 file changed** (+2 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+2 -3) </details> ### 📄 Description closes #4022 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Now returns a proper unauthorized error when trying to delete an organization without a valid session. <!-- 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:46:08 -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#30742