[PR #6343] [CLOSED] better-call-fix #14852

Closed
opened 2026-04-13 09:39:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6343
Author: @Paola3stefania
Created: 11/27/2025
Status: Closed

Base: canaryHead: fix/ci


📝 Commits (1)

📊 Changes

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

View changed files

📝 packages/better-auth/src/api/to-auth-endpoints.ts (+10 -2)

📄 Description

Summary by cubic

Fixed headers handling in auth endpoint error responses to accept both Headers instances and plain objects. This prevents runtime errors and keeps error responses consistent across environments.

  • Bug Fixes
    • In toAuthEndpoints and runAfterHooks, check e.headers instanceof Headers before wrapping, avoiding double-wrapping and type errors in Node/Edge runtimes.

Written for commit eff41aea3a. Summary will update automatically 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/6343 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 11/27/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/ci` --- ### 📝 Commits (1) - [`eff41ae`](https://github.com/better-auth/better-auth/commit/eff41aea3a53aad3fc58a11065a8a5463929b329) better-call-fix ### 📊 Changes **1 file changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/to-auth-endpoints.ts` (+10 -2) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixed headers handling in auth endpoint error responses to accept both Headers instances and plain objects. This prevents runtime errors and keeps error responses consistent across environments. - **Bug Fixes** - In toAuthEndpoints and runAfterHooks, check e.headers instanceof Headers before wrapping, avoiding double-wrapping and type errors in Node/Edge runtimes. <sup>Written for commit eff41aea3a53aad3fc58a11065a8a5463929b329. Summary will update automatically 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-04-13 09:39:58 -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#14852