diff --git a/src/adapter/deno/serve-static.ts b/src/adapter/deno/serve-static.ts index 33786b203..0a575dfe1 100644 --- a/src/adapter/deno/serve-static.ts +++ b/src/adapter/deno/serve-static.ts @@ -4,7 +4,7 @@ import type { Env, MiddlewareHandler } from '../../types' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore -const { open, lstatSync } = Deno +const { open, lstatSync, errors } = Deno export const serveStatic = ( options: ServeStaticOptions @@ -16,7 +16,9 @@ export const serveStatic = ( // eslint-disable-next-line @typescript-eslint/no-explicit-any return file ? (file.readable as any) : null } catch (e) { - console.warn(`${e}`) + if (!(e instanceof errors.NotFound)) { + console.warn(`${e}`) + } } } const pathResolve = (path: string) => {