Skip to content

PopiiErrorMiddleware

Popii


Popii / PopiiErrorMiddleware

Type Alias: PopiiErrorMiddleware<TState, TInput, TLocals>

Section titled “Type Alias: PopiiErrorMiddleware<TState, TInput, TLocals>”

PopiiErrorMiddleware<TState, TInput, TLocals> = (err, pop, next) => Promise<void> | void

Defined in: types.ts:238

Error-handling middleware — receives the thrown error as the first argument. Popii detects error middlewares by arity (function.length === 3), matching the Express convention. Always declare all three parameters explicitly; do not use rest args or defaults that reduce arity.

TState = any

TInput = any

TLocals = PopiiLocals & Record<string, any>

any

Pop<TState, TInput, TLocals>

(err?) => Promise<void> | void

Promise<void> | void