|
|
@@ -536,7 +536,11 @@ module.exports = (crowi) => {
|
|
|
}
|
|
|
|
|
|
const slackBotToken = crowi.configManager.getConfig('crowi', 'slackbot:token');
|
|
|
- await getConnectionStatus(slackBotToken);
|
|
|
+ const status = await getConnectionStatus(slackBotToken);
|
|
|
+ // console.log('status', status);
|
|
|
+ if (status.error != null) {
|
|
|
+ return res.apiv3Err(new ErrorV3(`Error occured while getting connection. Cause: ${status.error}`, 'send-message-failed'));
|
|
|
+ }
|
|
|
|
|
|
const { channel } = req.body;
|
|
|
const appSiteURL = crowi.configManager.getConfig('crowi', 'app:siteUrl');
|