[BUG] Exception when calling KeyVaultManagementClient.Vaults.CheckNameAvailabilityAsync
#1311
Open
3 tasks done
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
The text was updated successfully, but these errors were encountered: