diff --git a/src/index.js b/src/index.js index 903cc75a99a7667e2ff21be344b2f98e9493675e..923a539369534c0daf5acdfe587c3a35f9303ece 100644 --- a/src/index.js +++ b/src/index.js @@ -160,7 +160,7 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { AuthKey: apiAuthKey, 'Content-Type': 'application/x-www-form-urlencoded' }, - form: { + formData: { login: login, pass: password }, @@ -211,6 +211,7 @@ async function getData(response, baseUrl, apiAuthKey) { throw errors.UNKNOWN_ERROR } } catch (error) { + log('debug', 'Error from getAllAgregatsByAbonnement') throw new Error(errors.VENDOR_DOWN) } }