mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
port middlewares to authenticate users with headers and sessions
This commit is contained in:
@@ -21,7 +21,6 @@ export default function errorHandler (err, req, res, next) {
|
||||
// In case of a CustomError class, use it's data
|
||||
// Otherwise try to identify the type of error (mongoose validation, mongodb unique, ...)
|
||||
// If we can't identify it, respond with a generic 500 error
|
||||
|
||||
let responseErr = err instanceof CustomError ? err : null;
|
||||
|
||||
if (!responseErr) {
|
||||
|
||||
Reference in New Issue
Block a user