diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-21 10:36:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:36:13 -0500 |
commit | dd8a10948195f231a6a9eb652e3f208813904ad6 (patch) | |
tree | f9a4afeb67bbead882c29c2458a5f1f99e2e42db /std/http/file_server.ts | |
parent | d9efb8c02a0036d755c35e8e9c88d58bd45a9e2b (diff) |
refactor: remove unneeded ErrorKinds (#3936)
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-x | std/http/file_server.ts | 4 |
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") |