From 553e13b3282ae6250623a7d5222d3e07b6e40428 Mon Sep 17 00:00:00 2001 From: Hebilicious Date: Thu, 8 Jun 2023 03:23:16 +0700 Subject: [PATCH] chore: remove useless trycatch --- src/runtime/entries/cloudflare-pages.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/runtime/entries/cloudflare-pages.ts b/src/runtime/entries/cloudflare-pages.ts index 1a60f1e54b..034de092cc 100644 --- a/src/runtime/entries/cloudflare-pages.ts +++ b/src/runtime/entries/cloudflare-pages.ts @@ -31,15 +31,10 @@ export default { ) { const url = new URL(request.url); if (isPublicAssetURL(url.pathname)) { - try { - const [match] = getPublicAssetMatch(url.pathname); - return await env.ASSETS.fetch( - new Request(new URL("http://localhost" + match)) - ); - } catch (error) { - console.error(error); - throw error; - } + const [match] = getPublicAssetMatch(url.pathname); + return await env.ASSETS.fetch( + new Request(new URL("http://localhost" + match)) + ); } let body;