.NET LRO error handling is inconsistent with guidelines, each other #41961
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
design-discussion
An area of design currently under discussion and open to team and community feedback.
Milestone
While fixing(?) issue #41855 where we weren't throwing from an LRO for a failed status because the status monitor endpoint didn't return 200, I found that a lot of our hand-authored operations, our generation 1 (track 2) generated operations, and our generation 2 generated operations all seem to work a little differently and they don't seem to always follow our guidelines, which currently state:
We have a mix of some operations that only throw from the
Value
property - specifically theget_Value
accessor - and some that throw but don't include the response or the HTTP status code, though the latter is a bit confusing because it should be 200 OK according to the REST API guidelines.Examples of some differences:
azure-sdk-for-net/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateOperation.cs
Lines 72 to 95 in 2bffa0b
UpdateStatus
throwing.azure-sdk-for-net/sdk/core/Azure.Core/src/Shared/ProtocolOperation.cs
Lines 57 to 71 in 2bffa0b
I came across what seemed another 1 or 2 patterns, but having trouble remembering which they were / find them again.
The text was updated successfully, but these errors were encountered: