forked from DebaucheryLibrarian/traxxx
Added various tag photos and descriptions.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
const argv = require('../argv');
|
||||
const logger = require('../logger')(__filename);
|
||||
|
||||
function errorHandler(error, req, res, _next) {
|
||||
logger.warn(`Failed to fulfill request to ${req.path}: ${error.message}`);
|
||||
|
||||
if (argv.debug) {
|
||||
logger.error(error);
|
||||
}
|
||||
|
||||
if (error.httpCode) {
|
||||
res.status(error.httpCode).send(error.message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user