-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[formrecognizer] include error code for errors that occur during polling #12621
Conversation
for err in errors: | ||
message += "({}) {}\n".format(err["code"], err["message"]) | ||
raise HttpResponseError(message=message, response=response) | ||
error_message = "({}) {}{}".format(errors[0]["code"], errors[0]["message"], message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aligning with other languages to raise the first error in the list
poller = client.begin_copy_model(model.model_id, target=target) | ||
copy = poller.result() | ||
except HttpResponseError as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a test similar to this and I thought it was passing, but it turns out it wasn't actually raising an HttpResponseError
, so none of my asserts were actually being checked. Definitely recommend using with pytest.raises
. Example here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
…into regenerate_keys * 'master' of https://github.com/Azure/azure-sdk-for-python: (24 commits) rename FormField.type -> FormField.value_type (Azure#12708) 20200703 codereport (Azure#12361) Use the common Cosmos emulator template. (Azure#12678) Add azurestackhci ci.yml for pipeline generation. (Azure#12701) [ServiceBus] Resend received message (Azure#12457) AZURE_CLIENT_ID sets user-assigned managed identity for DefaultAzureCredential (Azure#12689) Add better autolockrenew on-failure handling capabilities. (Azure#12307) Update CODEOWNERS (Azure#12418) close client session in async tests (Azure#12656) Sync eng/common directory with azure-sdk-tools repository (Azure#12502) [Event Hubs] Use EventHubManagementClient to create test resources (Azure#12501) Increment package version after release of azure_identity (Azure#12675) [formrecognizer] include error code for errors that occur during polling (Azure#12621) Cross-language consistency changes (Azure#12669) Enable APIStubGen step (Azure#12615) Adding the ability to create a container with analytical storage turned on. (Azure#12408) [ServiceBus] Adjust user-agent following the guideline (Azure#12596) Release for Cognitive Services - Anomaly Detector (Azure#12582) [formrecognizer] Add type to FormField (Azure#12561) Add example summary for azure-identity readme.md (Azure#12509) ...
APIM Missing Operations reported in S360 (Azure#12621) * missing operations * swagger linter issues * suppression * add count property * fix swagger model issues
No description provided.