This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.57k
stars
4.82k
forks
source link
[BUG] Create Managed Certificate failed with status code 202 #46854
with WaitUntil.Completed set, it should wait till the long running operation finished, but it's not.
Later I checked on the azure portal, I saw that the cert was created successfully. So I don't know why my code gives error, it should await and return succeed.
Expected behavior
The code should work synchronously to create a managed certificate.
Actual behavior
Gives error
2024-10-27T22:23:57Z [Error] Failed to create managed cert
2024-10-27T22:23:57Z [Error] Service request failed.
Status: 202 (Accepted)
Service request succeeded. Response content and headers are not included to avoid logging sensitive data.
2024-10-27T22:23:57Z [Error] at Azure.ResourceManager.AppService.CertificatesRestOperations.CreateOrUpdateAsync(String subscriptionId, String resourceGroupName, String name, AppCertificateData data, CancellationToken cancellationToken)
at Azure.ResourceManager.AppService.AppCertificateCollection.CreateOrUpdateAsync(WaitUntil waitUntil, String name, AppCertificateData data, CancellationToken cancellationToken)
Library name and version
Azure.ResourceManager.AppService 1.2.0
Describe the bug
I use below code to create a managed certificate but I encounter error
The code is
Noticed the error code is 202, I don't really see what this error happen as it's supposed to be a long running/async operation, I am using
with
WaitUntil.Completed
set, it should wait till the long running operation finished, but it's not.Later I checked on the azure portal, I saw that the cert was created successfully. So I don't know why my code gives error, it should
await
and return succeed.Expected behavior
The code should work synchronously to create a managed certificate.
Actual behavior
Gives error
Reproduction Steps
try out below code
Environment