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.
The TokenCredential supplied to the SecretClient constructor is not valid for this vault
I should tell the user to (insert our business model for auth)
The network is fine but there is no such secret
I should tell the user (insert our business model for secrets)
Other possibilities too?
That's hard to write when SecretClient only throws ArgumentNullException, and GetSecretAsync is all Argument{}Exception and RequestFailedException with different messages (actual string message of exception not documented).
If the messages cannot be listed exhaustively in the documentation because they depend on other services that might update independently of SecretClient, it would be nice to at least have a list of the messages you do control, and links to the services you depend on in turn.
Type of issue
Missing information
Description
To us, there are important differences between
SecretClient
constructor is not valid for this vaultThat's hard to write when
SecretClient
only throwsArgumentNullException
, andGetSecretAsync
is allArgument{}Exception
andRequestFailedException
with different messages (actual string message of exception not documented).If the messages cannot be listed exhaustively in the documentation because they depend on other services that might update independently of
SecretClient
, it would be nice to at least have a list of the messages you do control, and links to the services you depend on in turn.In particular, for
RequestFailedException
:I would like to refer to the "client documentation" for a list of supported error codes.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/azure.security.keyvault.secrets.secretclient.getsecretasync?view=azure-dotnet#azure-security-keyvault-secrets-secretclient-getsecretasync(system-string-system-string-system-threading-cancellationtoken)
Content source URL
https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.Security.KeyVault.Secrets/SecretClient.xml
Document Version Independent Id
e8b105c4-4f21-3f4d-d6bc-8a47a7f93485
Article author
@azure-sdk
Metadata