@mantris/appify
Version:
Very opinionated Node.js API boilerplate as module.
16 lines (12 loc) • 341 B
JavaScript
const { HttpError } = require('@mantris/commons')
const ERROR_CODE = 'RESOURCE_NOT_FOUND'
const ERROR_MESSAGE = 'It seems the requested resource does not exist.'
/**
* @returns {Function} Middleware.
*/
module.exports = () => {
return (req, res, next) => next(
new HttpError.NotFound(ERROR_CODE, ERROR_MESSAGE)
)
}