Skip to content
Snippets Groups Projects
Commit 931976d2 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: change errors for enedis routes

parent e08767ed
No related branches found
No related tags found
1 merge request!31Resolve "[2] Clarifier pour l'utilisateur le type d'erreur sur SGE pour éviter l'agacement des utilisateurs"
......@@ -47,7 +47,7 @@ async function activateContract(
log('error', 'commanderCollectePublicationMesures')
log('error', err)
Sentry.captureException('commanderCollectePublicationMesures', err)
throw errors.LOGIN_FAILED
throw errors.CAPTCHA_RESOLUTION_FAILED
})
const parsedReply = await xml2js.parseStringPromise(response.body, {
......@@ -71,7 +71,7 @@ async function activateContract(
//TODO: handle SGT4B8: Il existe déjà plusieurs demandes en cours sur le point ?
//TODO: handle SGT4H9: La demande ne porte pas sur un point équipé d'un compteur communicant ouvert aux services niveau 2.
//TODO: handle SGT589: La demande ne peut pas aboutir car le compteur n'est actuellement pas téléopérable.
throw errors.LOGIN_FAILED
throw errors.CAPTCHA_RESOLUTION_FAILED
}
}
......
......@@ -34,7 +34,7 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
log('error', 'rechercherServicesSouscritsMesures')
log('error', err)
Sentry.captureException('rechercherServicesSouscritsMesures', err)
throw errors.LOGIN_FAILED
throw errors.CAPTCHA_RESOLUTION_FAILED
})
const parsedReply = await xml2js.parseStringPromise(response.body, {
......@@ -77,7 +77,7 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
'error',
'if an error is thrown here, it probably means that the contract has already been open today and that enedis cannot open a second one. Wait until tomorow to try again'
)
throw errors.LOGIN_FAILED
throw errors.CAPTCHA_RESOLUTION_FAILED
}
}
......
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