Improve centralized error handling

This commit is contained in:
richardtekula
2025-12-04 07:39:52 +01:00
parent 109cae1167
commit 35dfa07668
14 changed files with 266 additions and 336 deletions

View File

@@ -48,12 +48,6 @@ export const authenticate = async (req, res, next) => {
});
}
return res.status(401).json({
success: false,
error: {
message: 'Neplatný alebo expirovaný token',
statusCode: 401,
},
});
return next(error);
}
};