[PR #4091] [MERGED] fix: show error stack in debug mode #5182

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4091
Author: @himself65
Created: 8/19/2025
Status: Merged
Merged: 8/19/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/19/debug


📝 Commits (3)

📊 Changes

4 files changed (+205 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/__snapshots__/init.test.ts.snap (+1 -0)
📝 packages/better-auth/src/api/to-auth-endpoints.test.ts (+161 -0)
📝 packages/better-auth/src/api/to-auth-endpoints.ts (+33 -2)
📝 packages/better-auth/src/utils/logger.ts (+10 -1)

📄 Description

DX improvement: show the error stack when the user enables debug log.

Right now, it's pretty hard to trace which module throws the error

Related feedback: https://github.com/better-auth/better-auth/issues/4080#issuecomment-3201743847


🔄 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/4091 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/19/2025 **Status:** ✅ Merged **Merged:** 8/19/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/19/debug` --- ### 📝 Commits (3) - [`3cb467a`](https://github.com/better-auth/better-auth/commit/3cb467aa96ba7dbf390ed9b08035b096a2f648c3) fix: show error stack in debug mode - [`1b85ced`](https://github.com/better-auth/better-auth/commit/1b85ced7edc8a235c5c954b25cef9115b7b4fbe9) fix: debug mode - [`474acfe`](https://github.com/better-auth/better-auth/commit/474acfef4ac5469d19b724e72c0b101d303579bd) fix: snapshot ### 📊 Changes **4 files changed** (+205 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/__snapshots__/init.test.ts.snap` (+1 -0) 📝 `packages/better-auth/src/api/to-auth-endpoints.test.ts` (+161 -0) 📝 `packages/better-auth/src/api/to-auth-endpoints.ts` (+33 -2) 📝 `packages/better-auth/src/utils/logger.ts` (+10 -1) </details> ### 📄 Description DX improvement: show the error stack when the user enables debug log. Right now, it's pretty hard to trace which module throws the error Related feedback: https://github.com/better-auth/better-auth/issues/4080#issuecomment-3201743847 --- <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 12:13:13 -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#5182