Removed logging for validation error in frontend routing
refs #10525 - The logging in this place only introduced confusion and provided no usefull information
This commit is contained in:
parent
f34a9d2e36
commit
a936362051
@ -1,5 +1,3 @@
|
||||
const common = require('../../../lib/common');
|
||||
|
||||
/**
|
||||
* @description Centralised error handling for API requests.
|
||||
* @param {Function} next
|
||||
@ -16,8 +14,6 @@ function handleError(next) {
|
||||
// this post from Content API (by slug), but this is not a valid slug. With dynamic routing we cannot
|
||||
// add a regex to the target express route, because we don't know if people use /:slug/ or not. It's dynamic.
|
||||
if (err.errorType === 'ValidationError') {
|
||||
common.logging.error(err);
|
||||
|
||||
// @NOTE: Just try next router, it will end in a 404 if no router can resolve the request.
|
||||
return next();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user