Commit f5745d12 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[spirica] Handle ServerError (502 Bad Gateway)

Sometimes when trying to submit the form to access a transaction's
investments, the server randomly returns a ServerError in addition to
the already-handled ClientError.

Closes: 9676@zendesk
parent df4dfa96
......@@ -21,7 +21,7 @@ from __future__ import unicode_literals
from weboob.browser import LoginBrowser, URL, need_login
from weboob.exceptions import BrowserIncorrectPassword
from weboob.browser.exceptions import ClientError
from weboob.browser.exceptions import ClientError, ServerError
from .pages import LoginPage, AccountsPage, DetailsPage, MaintenancePage
......@@ -84,7 +84,7 @@ class SpiricaBrowser(LoginBrowser):
if index < max_count:
except ClientError as e:
except (ClientError, ServerError) as e:
# Check if we are logged out
if self.login.is_here():
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment