Skip to content
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

Don't throw during UpdateStatus for non-exceptional scenarios in LRO implementation #464

Open
MiYanni opened this issue Feb 29, 2020 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. v3 Version 3 of AutoRest C# generator.

Comments

@MiYanni
Copy link
Contributor

MiYanni commented Feb 29, 2020

From Heath:

FWIW, Krzysztof asked that we not throw during UpdateStatus for supported status codes (e.g. 200, 202, 404) and similar calls - only when getting a value (similar to Nullable). I believe Pavel was part of this discussion as well. As a result - with oversight from Krzysztof, the Key Vault pseudo-LROs are what Krzysztof wanted: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/src/DeleteKeyOperation.cs

Basically, if the operation completes successfully, any exceptions related to getting the T value should be not thrown from UpdateStatus, but throw when the user accesses Value. Normal exceptional circumstances (such as a polling failure) should be thrown from UpdateStatus.

@MiYanni MiYanni added the v3 Version 3 of AutoRest C# generator. label Feb 29, 2020
@MiYanni MiYanni added the backlog Planned future work. label May 7, 2020
@AlexGhiondea AlexGhiondea removed the backlog Planned future work. label May 13, 2020
@chamons chamons added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. v3 Version 3 of AutoRest C# generator.
Projects
None yet
Development

No branches or pull requests

3 participants