From dd8a10948195f231a6a9eb652e3f208813904ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 21 Feb 2020 10:36:13 -0500 Subject: refactor: remove unneeded ErrorKinds (#3936) --- std/http/file_server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/http') 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 { - if (e instanceof DenoError && e.kind === ErrorKind.NotFound) { + if (e instanceof Deno.Err.NotFound) { return { status: 404, body: encoder.encode("Not found") -- cgit v1.2.3