Deno.ServeOptions.onError - Deno documentation
property Deno.ServeOptions.onError

The handler to invoke when route handlers throw an error.

Type

(error: unknown) => Response | Promise<Response>