Open jag43 opened 2 years ago
It seems that the azure management api returns Invalid
but the only enum values are AccountNameInvalid
and AlreadyExists
(link)
The lib is in maintenance (and to be deprecated).
Please plan migrate to https://aka.ms/azsdk/dotnet/mgmt
Describe the bug Exception when calling
KeyVaultManagementClient.Vaults.CheckNameAvailabilityAsync
Exception or Stack Trace Message: Unable to deserialize the response. StackTrace:
Inner1 Message: Error converting value "Invalid" to type 'System.Nullable`1[Microsoft.Azure.Management.KeyVault.Models.Reason]'. Path 'reason', line 1, position 41. Inner 1 StackTrace:
Inner2 Message: Requested value 'Invalid' was not found. Inner2 StackTrace:
To Reproduce Call
KeyVaultManagementClient.Vaults.CheckNameAvailabilityAsync
with an invalid name (in our case the name was too long)Code Snippet
var checkNameAvailabilityResponse = await keyVaultClient.Vaults.CheckNameAvailabilityAsync(new VaultCheckNameAvailabilityParameters(keyVaultName), cancellationToken);
Expected behavior No exception to be thrown, response is able to deserialized and we get invalid name in the response
Screenshots If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
Additional context None
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report