Functions
errorHandler
Returns ((err: any, request: BaseRequest, response: BaseResponse, next: NextFunction) => Promise<void>)
Parameters
err: any
next: NextFunction
Returns Promise<void>
middleware
- middleware<OrigReqType, OrigRespType>(wrapRequest?: ((req: OrigReqType) => BaseRequest), wrapResponse?: ((req: OrigRespType) => BaseResponse)): ((request: OrigReqType, response: OrigRespType, next?: NextFunction) => Promise<{ error: undefined; handled: boolean } | { error: any; handled: undefined }>)
Type Parameters
Parameters
wrapRequest: ((req: OrigReqType) => BaseRequest) = identity
wrapResponse: ((req: OrigRespType) => BaseResponse) = identity
Returns ((request: OrigReqType, response: OrigRespType, next?: NextFunction) => Promise<{ error: undefined; handled: boolean } | { error: any; handled: undefined }>)
- (request: OrigReqType, response: OrigRespType, next?: NextFunction): Promise<{ error: undefined; handled: boolean } | { error: any; handled: undefined }>
Parameters
request: OrigReqType
response: OrigRespType
Optional next: NextFunction
Returns Promise<{ error: undefined; handled: boolean } | { error: any; handled: undefined }>