[PR #7741] [MERGED] fix(stripe): clarify error when authorizeReference is missing #7527

Closed
opened 2026-03-13 13:40:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7741
Author: @bytaesu
Created: 2/1/2026
Status: Merged
Merged: 2/1/2026
Merged by: @bytaesu

Base: canaryHead: 2026-02-01/fix/clearer-stripe-error-message


📝 Commits (2)

  • 81b63be fix(stripe): clarify error when authorizeReference is missing
  • bbeed65 test: update error code

📊 Changes

4 files changed (+6 additions, -4 deletions)

View changed files

📝 packages/stripe/src/error-codes.ts (+2 -0)
📝 packages/stripe/src/middleware.ts (+1 -1)
📝 packages/stripe/test/stripe-organization.test.ts (+2 -2)
📝 packages/stripe/test/stripe.test.ts (+1 -1)

📄 Description


Summary by cubic

Clarified the Stripe error when attempting organization subscriptions without an authorizeReference callback. The API now returns AUTHORIZE_REFERENCE_REQUIRED with a clear message to guide setup.

  • Bug Fixes
    • Added AUTHORIZE_REFERENCE_REQUIRED error code and message.
    • Middleware returns AUTHORIZE_REFERENCE_REQUIRED instead of ORGANIZATION_SUBSCRIPTION_NOT_ENABLED.
    • Updated tests to assert the new code and wording.

Written for commit bbeed6593b. Summary will update on new commits.


🔄 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/7741 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/1/2026 **Status:** ✅ Merged **Merged:** 2/1/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-02-01/fix/clearer-stripe-error-message` --- ### 📝 Commits (2) - [`81b63be`](https://github.com/better-auth/better-auth/commit/81b63becb43c360826f04f9911eb1f46476e035b) fix(stripe): clarify error when authorizeReference is missing - [`bbeed65`](https://github.com/better-auth/better-auth/commit/bbeed6593bcfc6ef2c66d3570734e681a8551f7b) test: update error code ### 📊 Changes **4 files changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/error-codes.ts` (+2 -0) 📝 `packages/stripe/src/middleware.ts` (+1 -1) 📝 `packages/stripe/test/stripe-organization.test.ts` (+2 -2) 📝 `packages/stripe/test/stripe.test.ts` (+1 -1) </details> ### 📄 Description - Closes https://github.com/better-auth/better-auth/issues/7680 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clarified the Stripe error when attempting organization subscriptions without an authorizeReference callback. The API now returns AUTHORIZE_REFERENCE_REQUIRED with a clear message to guide setup. - **Bug Fixes** - Added AUTHORIZE_REFERENCE_REQUIRED error code and message. - Middleware returns AUTHORIZE_REFERENCE_REQUIRED instead of ORGANIZATION_SUBSCRIPTION_NOT_ENABLED. - Updated tests to assert the new code and wording. <sup>Written for commit bbeed6593bcfc6ef2c66d3570734e681a8551f7b. Summary will update on new commits.</sup> <!-- 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-03-13 13:40:29 -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#7527