mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
swap warning for error
@gillespi314 btw you did this exactly right, I just realized when I tested this out (after realizing I had it configured wrong in prod) that I should have recommended an error instead of a warning
This commit is contained in:
parent
74b4cd535f
commit
32b4d53e7f
@ -58,7 +58,7 @@ module.exports = {
|
|||||||
fn: async function({emailAddress, topic, firstName, lastName, message}) {
|
fn: async function({emailAddress, topic, firstName, lastName, message}) {
|
||||||
|
|
||||||
if (!sails.config.custom.slackWebhookUrlForContactForm) {
|
if (!sails.config.custom.slackWebhookUrlForContactForm) {
|
||||||
sails.log.warn(
|
throw new Error(
|
||||||
'Message not delivered: slackWebhookUrlForContactForm needs to be configured in sails.config.custom. Here\'s the undelivered message: ' +
|
'Message not delivered: slackWebhookUrlForContactForm needs to be configured in sails.config.custom. Here\'s the undelivered message: ' +
|
||||||
`Name: ${firstName + ' ' + lastName}, Email: ${emailAddress}, Topic: ${topic}, Message: ${message ? message : 'No message.'}`
|
`Name: ${firstName + ' ' + lastName}, Email: ${emailAddress}, Topic: ${topic}, Message: ${message ? message : 'No message.'}`
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user