diff --git a/src/index.js b/src/index.js index 1cddbc54890a6c963a87b8f407fc7f472ff902ee..65a95460decca0838e494f4353af6ac5e6ac6dfb 100644 --- a/src/index.js +++ b/src/index.js @@ -221,7 +221,7 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { return resp.data } else { const errorMessage = `Authentication failed. Response data: ${resp.data.libelleRetour}` - log('error', errorMessage) + log('debug', errorMessage) throw new Error(`code retour ko : ${resp.data.codeRetour}`) } } catch (error) { @@ -236,6 +236,8 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { } async function getData(response, baseUrl, apiAuthKey) { + log('debug', 'Start date : ' + startDate) + log('debug', 'End date : ' + endDate) const dataRequest = { method: 'post', url: baseUrl + '/getAllAgregatsByAbonnement.aspx', @@ -346,6 +348,8 @@ function format(response) { * Save data in the right doctype db and prevent duplicated keys */ async function storeData(data, doctype, filterKeys) { + log('debug', 'Store into ' + doctype) + log('debug', 'Store into keys : ' + filterKeys) const filteredDocuments = await hydrateAndFilter(data, doctype, { keys: filterKeys, })