From c7f7317cddc52e4552bebad32da9813697b4669f Mon Sep 17 00:00:00 2001 From: flakey5 <73616808+flakey5@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:36:11 -0700 Subject: [PATCH] fix: await handlers so any errors are caught --- src/worker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/worker.ts b/src/worker.ts index af653ac..dafb200 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -17,11 +17,11 @@ const cloudflareWorker: Worker = { switch (request.method) { case 'HEAD': case 'GET': - return handlers.get(request, env, ctx, cache); + return await handlers.get(request, env, ctx, cache); case 'POST': - return handlers.post(request, env, ctx, cache); + return await handlers.post(request, env, ctx, cache); case 'OPTIONS': - return handlers.options(request, env, ctx, cache); + return await handlers.options(request, env, ctx, cache); default: return responses.METHOD_NOT_ALLOWED; }