From: Ardis Lu Date: Sun, 5 Feb 2023 00:19:39 +0000 (-0800) Subject: Use proper response status code for error X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=18b76dabd2f2a13ed43c3caa096fb3f3f121605d;p=cloudflare-workers Use proper response status code for error --- diff --git a/buttcoin/index.js b/buttcoin/index.js index 1699bbc..fc398bf 100644 --- a/buttcoin/index.js +++ b/buttcoin/index.js @@ -52,7 +52,7 @@ export default { remoteUrl = new URL(queryString); } catch { - return new Response('Invalid URL provided in query string.'); + return new Response('Invalid URL provided in query string.', { status: 400 }); } const response = await fetch(remoteUrl);