function brandErrorResponder
Since 0.1.0
brandErrorResponder(
middleware: object,
responder: IErrorResponder
): void

Brands a middleware function with the application's resolved error responder, so the kernel can reach it at the pre-pipeline sites.

Called by @setu-ts/exceptions' errorHandler on the middleware it returns; the responder is the same instance the middleware publishes into ctx.state, built once at factory time.

Parameters

middleware: object

The middleware function to brand

The resolved error responder

Return Type

void

Usage

import { brandErrorResponder } from "common/src/index.ts";