Azure / Azure/azure-sdk-for-python
Question: Error handling in Document Intelligence client library
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g 2h
- PR unite (30g)
- 213
Descrizione
Using the synchronous blocking Document Intelligence client library for Python, not the async package.
Version:
azure-ai-documentintelligence==1.0.2
```
def _analyze_document(self, f, output_content_format=None) -> AnalyzeResult:
poller = self.document_intelligence_client.begin_analyze_document("prebuilt-layout", f, content_type="application/octet-stream", output_content_format=output_content_format)
result: AnalyzeResult = poller.result()
return result
```
The code above is based on the Microsoft examples here:
https://azuresdkdocs.z19.web.core.windows.net/python/azure-ai-documentintelligence/1.0.2/index.html#examples
The example code snippets do not have any retry logic or any exception handling.
Does the poller.result() method internally handle exceptions and retries?
I'm not using the async IO package. What is the right way to handle rate limiting errors and other errors when using the service?
If this is documented somewhere, please point me to the documentation.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.