The new woob repository is here: This gitlab will be removed soon.

Commit a5d0c13e authored by thibault douge's avatar thibault douge Committed by Vincent A

[orange] return empty list of invoices if the user is not the account holder

parent 0ed6abb9
......@@ -299,6 +299,14 @@ def iter_documents(self, subscription):
return []
except ClientError as e:
if e.response.status_code == 412:
# if the code is 412 the user is not the owner of the subscription and we can't get the invoices
msg = e.response.json()['error']['customerMessage']['subMessage']"no documents because: %s", msg)
return []
for b in
return iter(documents)
......@@ -327,5 +335,5 @@ def download_document(self, document):
except ClientError as e:
if e.response.status_code == 422:
# if the code is 422 the download of the document is currently unavailable
return NotAvailable
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