mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
remove comment and improve logging
This commit is contained in:
@@ -19,7 +19,11 @@ function sendWebhook (webhook, body, user) {
|
|||||||
// Not calling .json() to parse the response because we simply ignore it
|
// Not calling .json() to parse the response because we simply ignore it
|
||||||
}).catch(webhookErr => {
|
}).catch(webhookErr => {
|
||||||
// Log the error
|
// Log the error
|
||||||
logger.error(webhookErr, 'Error while sending a webhook request.');
|
logger.error(webhookErr, {
|
||||||
|
extraMessage: 'Error while sending a webhook request.',
|
||||||
|
userId: user._id,
|
||||||
|
webhook,
|
||||||
|
});
|
||||||
|
|
||||||
let _failuresReset = false;
|
let _failuresReset = false;
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export const schema = new Schema({
|
|||||||
required: true,
|
required: true,
|
||||||
validate: [v => validator.isURL(v, {
|
validate: [v => validator.isURL(v, {
|
||||||
require_tld: !!IS_PRODUCTION, // eslint-disable-line camelcase
|
require_tld: !!IS_PRODUCTION, // eslint-disable-line camelcase
|
||||||
require_protocol: true, // TODO migrate existing ones
|
require_protocol: true,
|
||||||
protocols: ['http', 'https'],
|
protocols: ['http', 'https'],
|
||||||
}), shared.i18n.t('invalidUrl')],
|
}), shared.i18n.t('invalidUrl')],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user