agnostic-http-error-handler
Node.js framework agnostic HTTP error handler.
Usage
Express.js
const express: errMiddleware = const service = service service service
Restana
const restana: errorHandler = const service = errorHandler service servicestart
Native
const native: errorHandler = ...server
Pre-Error-Handler callback
In case you would like to extend the error processing logic of your application, you can use the preErrorHandler
configuration callback:
const logger = const native: errorHandler = { logger} ...server
NOTE: In case the
preErrorHandler
invocation response can be coerce as a TRUE value, sending theresponsePayload
to the client is aborted.
Sponsors
- Kindly sponsored by ShareNow, a company that promotes innovation!