Przeglądaj źródła

Update error code

arvid-e 6 miesięcy temu
rodzic
commit
9c68ca803e

+ 1 - 1
apps/app/src/server/routes/apiv3/user-activities.ts

@@ -164,7 +164,7 @@ module.exports = (crowi: Crowi): Router => {
 
       if (!user || !user._id) {
         logger.error('Authentication failure: req.user is missing after loginRequiredStrictly.');
-        return res.apiv3Err('Internal server error due to missing user data.', 500);
+        return res.apiv3Err('Authentication failed.', 401);
       }
 
       const userId = user._id;