Skip to content

Commit 1af356b

Browse files
♻️ fix invalid catch mechanism for polling (#309)
1 parent 3d3b68a commit 1af356b

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

docs/extras/guide/expense_receipts_v5.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ Aside from the basic `BaseField` attributes, the tax field `TaxField` also imple
189189

190190
* **rate** (`float`): the tax rate applied to an item expressed as a percentage. Can be `None`.
191191
* **code** (`str`): tax code (or equivalent, depending on the origin of the document). Can be `None`.
192-
* **base** (`float`): base amount used for the tax. Can be `None`.
192+
* **basis** (`float`): base amount used for the tax. Can be `None`.
193+
* **value** (`float`): the value of the tax. Can be `None`.
193194

194195
> Note: currently `TaxField` is not used on its own, and is accessed through a parent `Taxes` object, a list-like structure.
195196

docs/extras/guide/financial_document_v1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ Aside from the basic `BaseField` attributes, the tax field `TaxField` also imple
233233

234234
* **rate** (`float`): the tax rate applied to an item expressed as a percentage. Can be `None`.
235235
* **code** (`str`): tax code (or equivalent, depending on the origin of the document). Can be `None`.
236-
* **base** (`float`): base amount used for the tax. Can be `None`.
236+
* **basis** (`float`): base amount used for the tax. Can be `None`.
237+
* **value** (`float`): the value of the tax. Can be `None`.
237238

238239
> Note: currently `TaxField` is not used on its own, and is accessed through a parent `Taxes` object, a list-like structure.
239240

docs/extras/guide/invoices_v4.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ Aside from the basic `BaseField` attributes, the tax field `TaxField` also imple
221221

222222
* **rate** (`float`): the tax rate applied to an item expressed as a percentage. Can be `None`.
223223
* **code** (`str`): tax code (or equivalent, depending on the origin of the document). Can be `None`.
224-
* **base** (`float`): base amount used for the tax. Can be `None`.
224+
* **basis** (`float`): base amount used for the tax. Can be `None`.
225+
* **value** (`float`): the value of the tax. Can be `None`.
225226

226227
> Note: currently `TaxField` is not used on its own, and is accessed through a parent `Taxes` object, a list-like structure.
227228

mindee/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ def enqueue_and_parse(
351351
while retry_counter < max_retries:
352352
if poll_results.job.status == "completed":
353353
break
354+
if poll_results.job.status == "failed":
355+
raise MindeeError("Parsing failed for job {poll_results.job.id}")
354356
logger.debug(
355357
"Polling server for parsing result with job id: %s", queue_result.job.id
356358
)

0 commit comments

Comments
 (0)