Skip to content
Snippets Groups Projects
Commit fe1022f8 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix: logging

parent 649098d5
No related branches found
No related tags found
1 merge request!12Feat/donnes tech debut contrat
......@@ -368,6 +368,7 @@ async function getDataHalfHour(url, apiAuthKey, userLogin, pointId) {
const incrementedEndDateString = moment(endDate)
.subtract(7 * i, 'day')
.format('YYYY-MM-DD')
const { response } = await soapRequest({
url: url,
headers: sgeHeaders,
......@@ -425,7 +426,10 @@ function processData(doctype = 'com.grandlyon.enedis.day') {
}
} catch (e) {
if (doctype === 'com.grandlyon.enedis.minute') {
log('warn', `No half-hour activated`)
log(
'warn',
`No half-hour activated. Issue: ${result.Envelope.Body.Fault.faultstring}`
)
} else {
log('error', `Unkown error ${e}`)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment