1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/lib/routes/admin-api/route-utils.js
ivaosthu f5e9ca3bbe Implement support for logger provider.
This allows the users of 'unleash-server' to programatically
change the logger implemnentation. #175
2020-02-20 08:33:33 +01:00

11 lines
232 B
JavaScript

'use strict';
const logger = require('../../logger')('route-utils.js');
const catchLogAndSendErrorResponse = (err, res) => {
logger.error(err);
res.status(500).end();
};
module.exports = { catchLogAndSendErrorResponse };