Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
8.42.0
Framework Version
"@sveltejs/kit": "^2.6.2", "svelte": "^4.1.2", "@sveltejs/adapter-vercel": "^5.5.0"
Link to Sentry event
Reproduction Example/SDK Setup
On hooks.server.ts
:
Sentry.init({
dsn: "xxx",
tracesSampleRate: 1.0,
integrations: [Sentry.consoleIntegration(), Sentry.captureConsoleIntegration({ levels: ["error"] })],
enabled: import.meta.env.MODE === "production",
});
export const handle = sequence(Sentry.sentryHandle(), mySelfHandle);
Steps to Reproduce
- Use node 20.x or node 22.x (btw, no bugs on Node 18.x)
- Enable Sentry
- Send multiple requests to an interface at the same time
Expected Result
All requests are received and returned normally
Actual Result
A small number (one or two) of them return results normally, but the rest all have errors:
TypeError: Body is unusable: Body has already been read
at consumeBody (node:internal/deps/undici/undici:5463:15)
at _Request.json (node:internal/deps/undici/undici:5416:18)
at POST (file:///var/task/vercel/path0/.svelte-kit/output/server/entries/endpoints/api/v1/quiz/freeform/_server.ts.js:20:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async render_endpoint (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:184:20)
at async resolve2 (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:2721:22)
at async sessionCookieInvalidationHandle (file:///var/task/vercel/path0/.svelte-kit/output/server/chunks/hooks.server.js:68:20)
at async /var/task/vercel/path0/node_modules/@sentry/sveltekit/build/cjs/server/handle.js:140:21
at async instrumentHandle (/var/task/vercel/path0/node_modules/@sentry/sveltekit/build/cjs/server/handle.js:128:27)
at async respond (file:///var/task/vercel/path0/.svelte-kit/output/server/index.js:2615:22)
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Community