zahmis 5 лет назад
Родитель
Сommit
edebe1aa0c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/slack/src/middlewares/verification-slack-request.ts

+ 1 - 1
packages/slack/src/middlewares/verification-slack-request.ts

@@ -21,7 +21,7 @@ export const verificationSlackRequest = (req : Request & signingSecretType, res:
   const timestamp = req.headers['x-slack-request-timestamp'];
 
   if (slackSignature == null || timestamp == null) {
-    throw new Error('Verification failed.');
+    return res.status(401).send({ message: 'Unauthorized. Enter from Slack workspace' });
   }
 
   // protect against replay attacks