|
@ -65,7 +65,6 @@ module.exports = (app) => { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return null |
|
|
|
|
|
const response = await axios.post(defaultParams.url, data, { headers: defaultParams.headers }); |
|
|
const response = await axios.post(defaultParams.url, data, { headers: defaultParams.headers }); |
|
|
return response; |
|
|
return response; |
|
|
} |
|
|
} |
|
@ -91,7 +90,7 @@ module.exports = (app) => { |
|
|
// Create a new listener for the parse.error event
|
|
|
// Create a new listener for the parse.error event
|
|
|
emitter.on('parse.error', async ({ filepath, columns, error }) => { |
|
|
emitter.on('parse.error', async ({ filepath, columns, error }) => { |
|
|
try { |
|
|
try { |
|
|
const reponse = await sendEmail(sendgridParams.to, 'BODACC - Erreur traitement', '<p>Erreur traitement</p><br /><p>Voici le message d\'erreur: ' + error + '</p>') |
|
|
const response = await sendEmail(sendgridParams.to, 'BODACC - Erreur traitement', '<p>Erreur traitement</p><br /><p>Voici le message d\'erreur: ' + error + '</p>') |
|
|
emitter.emit('mailer.parse.error.success', { response: response }); |
|
|
emitter.emit('mailer.parse.error.success', { response: response }); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
emitter.emit('mailer.parse.error.error', { error: errorResponse(error) }); |
|
|
emitter.emit('mailer.parse.error.error', { error: errorResponse(error) }); |
|
|