fix(updateMyCurrentChallenge): Bad mongo id will return user error
Mark these errors to be reported to the user instead of logged as a server fault
This commit is contained in:
@ -18,6 +18,7 @@ export function wrapHandledError(err, {
|
||||
return err;
|
||||
}
|
||||
|
||||
// for use with express-validator error formatter
|
||||
export const createValidatorErrorFormatter = (type, redirectTo, status) =>
|
||||
({ msg }) => wrapHandledError(
|
||||
new Error(msg),
|
||||
|
Reference in New Issue
Block a user