summaryrefslogtreecommitdiff
path: root/std/http/io.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/http/io.ts')
-rw-r--r--std/http/io.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/http/io.ts b/std/http/io.ts
index b53b52527..5518146a8 100644
--- a/std/http/io.ts
+++ b/std/http/io.ts
@@ -242,7 +242,7 @@ export async function writeResponse(
const statusText = STATUS_TEXT.get(statusCode);
const writer = BufWriter.create(w);
if (!statusText) {
- throw Error("bad status code");
+ throw new Deno.errors.InvalidData("Bad status code");
}
if (!r.body) {
r.body = new Uint8Array();