Skip to main content
Module

x/cav/mod.ts>ResolveErrorArg

A server framework for Deno
Go to Latest
interface ResolveErrorArg
implements CtxArg
import { type ResolveErrorArg } from "https://deno.land/x/cav@0.0.14/mod.ts";

Arguments available to the OnError function of an Rpc.

Properties

error: unknown

The thrown error.

optional
ctx: unknown

If the error happened after context creation, this will be the returned context object. Otherwise, it'll be undefined.

optional
message: unknown

If the error happened after message parsing, this will be the parsed message. Otherwise, it'll be undefined.

asset: (opt: ServeAssetOptions) => Promise<Response>

Only provided if this is a non-socket Rpc. Searches for an asset on disk and either returns a Response containing that asset or throws a NO_MATCH error if the asset isn't found. See the documentation for the top-level asset() function for more details; this function is the same thing but bound to the Request received by the Rpc.