[ameli] fix monthly reports and errors related to session expiration
The content of the document pages ('as_releve_mensuel_paiement_page', 'relevemensuelpaiement') have changed (both HTML and JSON) have changed and the module needed some update.
Additionally, in the case of an expired session, we can have multiple issues with the current code:
- The previous URL is called, and instead a login page is presented - without redirection. We currently did not catch this
- We are redirected to an error page which does not mention any session expiration issue, but instead a website unavailable issue
- We loop on an error page.
This patch tries to fix this :
- Page that should be logged but can receive a login page content instead now detect this situation.
- When accessing a site page with an expired session, we can receive the BrowserUnavailable exception
Oups... votre compte ameli est momentanément indisponible. Il sera de retour en pleine forme très bientôt.
In that case we try a new login. - In case the previous URL is already an error page, we try a new login
Hopefully this will reduce the number of expiration-related issues
Edited by Ludovic LANGE