From c4f35dbe837d2d8034d84eff57bfabdfbc55f439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6ssler?= Date: Thu, 19 Dec 2024 17:54:29 +0100 Subject: [PATCH] Extend message --- library/agent/context/user.test.ts | 2 +- library/agent/context/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/agent/context/user.test.ts b/library/agent/context/user.test.ts index b727335a..78f79c3b 100644 --- a/library/agent/context/user.test.ts +++ b/library/agent/context/user.test.ts @@ -42,7 +42,7 @@ t.test("usage outside of context", async (t) => { setUser({ id: "id" }); t.same(logs, [ - "setUser(...) was called without a context. The data will not be tracked. Make sure to call setUser(...) within an HTTP request.", + "setUser(...) was called without a context. The user will not be tracked. Make sure to call setUser(...) within an HTTP request. If you're using serverless functions, make sure to use the handler wrapper provided by Zen.", ]); // Should not log again diff --git a/library/agent/context/user.ts b/library/agent/context/user.ts index dda112e4..9e51e0f1 100644 --- a/library/agent/context/user.ts +++ b/library/agent/context/user.ts @@ -90,7 +90,7 @@ function logWarningSetUserCalledWithoutContext() { // eslint-disable-next-line no-console console.warn( - "setUser(...) was called without a context. The data will not be tracked. Make sure to call setUser(...) within an HTTP request." + "setUser(...) was called without a context. The user will not be tracked. Make sure to call setUser(...) within an HTTP request. If you're using serverless functions, make sure to use the handler wrapper provided by Zen." ); loggedWarningSetUserCalledWithoutContext = true;