diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 36d4a2e3bb38..72e5a2a87bdd 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -117,7 +117,6 @@ print(ec_key.key_material.kty) key = key_client.get_key("key-name") print(key.name) -print(key.value) ``` ### Update an existing Key @@ -217,6 +216,7 @@ Key Vault clients raise exceptions defined in azure-core. For more detailed infr For example, if you try to retrieve a key after it is deleted a `404` error is returned, indicating resource not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. ```python +from azure.core.exceptions import ResourceNotFoundError try: key_client.get_key("deleted_key") except ResourceNotFoundError as e: diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index b0650e78bf38..5a2745ba7bf3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -199,6 +199,7 @@ Key Vault clients raise exceptions defined in azure-core. For more detailed infr For example, if you try to retrieve a secret after it is deleted a `404` error is returned, indicating resource not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. ```python +from azure.core.exceptions import ResourceNotFoundError try: secret_client.get_secret("deleted_secret") except ResourceNotFoundError as e: