diff --git a/index.js b/index.js index 7f7dc2e3e51887dbc297eabc8445df7d1af0d3cc..3750910a3b1600272d7b6d071515cc97eb069a86 100644 --- a/index.js +++ b/index.js @@ -259,7 +259,13 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { }, json: true }; - const response = await rp(authRequest); + let response = {} + try { + await rp(authRequest); + } catch(e) { + log("error", "POUET ERROR"); + log("error", e) + } log("debug", `Auth code: ${response.codeRetour}`); if (response.codeRetour === 100) {