Explorar o código

delete try-catch

zahmis %!s(int64=4) %!d(string=hai) anos
pai
achega
fd7c2d5d87
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      src/server/routes/apiv3/slack-integration-settings.js

+ 1 - 7
src/server/routes/apiv3/slack-integration-settings.js

@@ -536,13 +536,7 @@ module.exports = (crowi) => {
     }
 
     const slackBotToken = crowi.configManager.getConfig('crowi', 'slackbot:token');
-    try {
-      await getConnectionStatus(slackBotToken);
-    }
-    catch (error) {
-      logger.error('Error', error);
-      return res.apiv3Err(new ErrorV3(`Error occured while testing. Cause: ${error.message}`, 'test-failed', error.stack));
-    }
+    await getConnectionStatus(slackBotToken);
 
     const { channel } = req.body;
     const appSiteURL = crowi.configManager.getConfig('crowi', 'app:siteUrl');