summaryrefslogtreecommitdiff
path: root/std/http/file_server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-xstd/http/file_server.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index aa0ff49da..acc3a20cd 100755
--- a/std/http/file_server.ts
+++ b/std/http/file_server.ts
@@ -6,7 +6,7 @@
// TODO Add tests like these:
// https://github.com/indexzero/http-server/blob/master/test/http-server-test.js
-const { ErrorKind, DenoError, args, stat, readDir, open, exit } = Deno;
+const { args, stat, readDir, open, exit } = Deno;
import { posix } from "../path/mod.ts";
import {
listenAndServe,
@@ -163,7 +163,7 @@ async function serveDir(
}
async function serveFallback(req: ServerRequest, e: Error): Promise<Response> {
- if (e instanceof DenoError && e.kind === ErrorKind.NotFound) {
+ if (e instanceof Deno.Err.NotFound) {
return {
status: 404,
body: encoder.encode("Not found")