mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Captured bulk-email errors in Sentry
no issue
This commit is contained in:
parent
4fda464103
commit
edfc07b9c8
1 changed files with 6 additions and 2 deletions
|
@ -3,6 +3,7 @@ const common = require('../../lib/common');
|
|||
const mailgunProvider = require('./mailgun');
|
||||
const configService = require('../../config');
|
||||
const settingsCache = require('../settings/cache');
|
||||
const sentry = require('../../sentry');
|
||||
|
||||
/**
|
||||
* An object representing batch request result
|
||||
|
@ -100,10 +101,13 @@ module.exports = {
|
|||
if (error) {
|
||||
// NOTE: logging an error here only but actual handling should happen in more sophisticated batch retry handler
|
||||
// REF: possible mailgun errors https://documentation.mailgun.com/en/latest/api-intro.html#errors
|
||||
common.logging.warn(new common.errors.GhostError({
|
||||
let ghostError = new common.errors.GhostError({
|
||||
err: error,
|
||||
context: common.i18n.t('errors.services.mega.requestFailed.error')
|
||||
}));
|
||||
});
|
||||
|
||||
sentry.captureException(ghostError);
|
||||
common.logging.warn(ghostError);
|
||||
|
||||
// NOTE: these are generated variables, so can be regenerated when retry is done
|
||||
const data = _.omit(batchData, ['recipient-variables']);
|
||||
|
|
Loading…
Add table
Reference in a new issue