Browse Source

Update error code

arvid-e 6 months ago
parent
commit
9c68ca803e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/app/src/server/routes/apiv3/user-activities.ts

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

@@ -164,7 +164,7 @@ module.exports = (crowi: Crowi): Router => {
 
 
       if (!user || !user._id) {
       if (!user || !user._id) {
         logger.error('Authentication failure: req.user is missing after loginRequiredStrictly.');
         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;
       const userId = user._id;