Skip to main content
Module

x/cav/mod.ts>ResolveErrorArg

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

Arguments available to the resolveError() function of an Rpc.

Properties

req: Request

The incoming Request.

res: ResponseInit & { headers: Headers; }

A ResponseInit applied to the Rpc response after resolving and packing the value to send to the client. The Headers object is always available. If the resolved value is a Response object already, the status and statusText will be ignored but the headers will still be applied.

url: URL

The WHATWG URL for the current Request.

conn: http.ConnInfo

The Deno-provided ConnInfo associated with the request.

path: string

The Stack routed path of the request.

query: Record<string, string | string[]>

The raw query object associated with this request.

groups: Record<string, string>

The path groups captured by the containing Stack(s).

error: unknown

The thrown error.

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

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