1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-22 06:39:44 +02:00

fix: Fix error output when sending email or message to Slack

This commit is contained in:
Maksim Eltyshev 2024-04-12 12:07:19 +02:00
parent 16499052f7
commit 8a8c1fee0c
3 changed files with 6 additions and 6 deletions

View file

@ -35,19 +35,19 @@ module.exports = {
body: JSON.stringify(body),
});
} catch (error) {
sails.log.error(error); // TODO: provide description text?
sails.log.error(`Error sending to Slack: ${error}`);
return;
}
if (!response.ok) {
sails.log.error('Error sending to Slack: %s', response.error);
sails.log.error(`Error sending to Slack: ${response.error}`);
return;
}
const responseJson = await response.json();
if (!responseJson.ok) {
sails.log.error('Error sending to Slack: %s', responseJson.error);
sails.log.error(`Error sending to Slack: ${responseJson.error}`);
}
},
};