-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
When using the Azure Document Intelligence Python SDK, I encountered a ResourceNotFoundError with a 404 status code. After spending a full day debugging, I found out that the error was due to the Zone I selected when creating the Document Intelligence resource being unsupported. However, the error message did not explicitly mention that the issue was related to the unsupported Zone, leading to unnecessary time spent troubleshooting.
I would like the exception message to explicitly indicate when a Zone or Location selected for the Document Intelligence resource is not supported. This could save developers significant time by providing more specific guidance on why the resource is not found.
An alternative could be to provide a warning or validation during the resource creation process in the Azure Portal if a user selects a Zone or Location that is not supported by the Document Intelligence service.
context
Created a document intelligence resource on Azure portal & got 2 Keys, Location/Region & an endpoint.
Documentation URL - https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/quickstarts/get-started-sdks-rest-api?view=doc-intel-4.0.0&pivots=programming-language-python#prebuilt-model
Current Error message Structure :

azure.core.exceptions.ResourceNotFoundError: (404) Resource not found
Code: 404
Message: Resource not found
python-BaseException
Proposed Error message Structure :
azure.core.exceptions.ResourceNotFoundError: (404) Resource not found
Code: 404
Message: Resource not found (Zone not supported as of now, consider recreating document intelligent resource with the supported Zones)
python-BaseException
Explicitly stating this in the error message would improve the developer experience.