packages/deno/src/wrap-deno-request-handler.ts:49:
const client = getClient();
if (!client) {
throw new Error('could not get Deno client. Did you run Sentry.init?');
}
Once denoServeIntegration has patched Deno.serve, the patch outlives the client. After Sentry.close(), or if a second init() fails, every incoming request throws before reaching the user's handler. Cloudflare's equivalent (wrapRequestHandlerWithInit) treats client === undefined as a pass-through and never blocks the request.
Work item. Replace the throw with a pass-through to handler() plus a debug.warn. Add a test that calls the wrapped handler with no client bound and asserts the user's response still comes back.
packages/deno/src/wrap-deno-request-handler.ts:49:Once
denoServeIntegrationhas patchedDeno.serve, the patch outlives the client. AfterSentry.close(), or if a secondinit()fails, every incoming request throws before reaching the user's handler. Cloudflare's equivalent (wrapRequestHandlerWithInit) treatsclient === undefinedas a pass-through and never blocks the request.Work item. Replace the throw with a pass-through to
handler()plus adebug.warn. Add a test that calls the wrapped handler with no client bound and asserts the user's response still comes back.