From fa54732e59068d5a13d98ebd312102c96e35ec0c Mon Sep 17 00:00:00 2001 From: ping-maxwell Date: Thu, 27 Nov 2025 07:11:24 +1000 Subject: [PATCH] chore: add stack-traces to node:async_hooks error --- packages/core/src/async_hooks/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/async_hooks/index.ts b/packages/core/src/async_hooks/index.ts index 54e4b49c16..487baa011b 100644 --- a/packages/core/src/async_hooks/index.ts +++ b/packages/core/src/async_hooks/index.ts @@ -16,6 +16,8 @@ const AsyncLocalStoragePromise: Promise = import( if ("AsyncLocalStorage" in globalThis) { return (globalThis as any).AsyncLocalStorage; } + const errorStack = err.stack; + console.warn(errorStack); console.warn( "[better-auth] Warning: AsyncLocalStorage is not available in this environment. Some features may not work as expected.", );