'use strict'; const errorChain = require("error-chain"); let HttpError = errorChain.create("HttpError", { context: { exposeToUser: true } }); module.exports = { UnauthorizedError: errorChain.create("UnauthorizedError", { inheritsFrom: HttpError, context: { statusCode: 401 } }), ForbiddenError: errorChain.create("ForbiddenError", { inheritsFrom: HttpError, context: { statusCode: 403 } }, HttpError), };