From ca274491a9940df95d918719268569feb77bf5ad Mon Sep 17 00:00:00 2001 From: Frawley Date: Sun, 22 Oct 2023 09:23:54 -0400 Subject: [PATCH] Fix unhandled exception on invalid endpoint --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c7c9bed..982e3b0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -90,7 +90,7 @@ rootRouter.all("*", ({ url }) => { export default { fetch: (request: Request, env: Env) => - router.handle(request, env).catch(async (err) => { + rootRouter.handle(request, env).catch(async (err) => { console.log(err.message); if (err instanceof ResponseError) {