Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor error message for unsupported operations #13128

Closed
chlowell opened this issue Aug 14, 2020 · 2 comments
Closed

Poor error message for unsupported operations #13128

chlowell opened this issue Aug 14, 2020 · 2 comments
Labels
Autorest Issue Client This issue points to a problem in the data-plane of the library. KeyVault
Milestone

Comments

@chlowell
Copy link
Member

CertificateClient supports Key Vault version 2016-10-01, but that service version doesn't support the backup_certificate operation added in 7.0. So this code raises an error:

from azure.keyvault.certificates import ApiVersion, CertificateClient

client = CertificateClient(VAULT_URL, object(), api_version=ApiVersion.V2016_10_01)
client.backup_certificate("...")

The error suggests the client or service doesn't support this particular API version, when in fact it's only this particular operation which is not supported:

  File "...\azure-keyvault-certificates\azure\keyvault\certificates\_generated\_operations_mixin.py", line 54, in backup_certificate
    raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2016-10-01 is not available
@chlowell chlowell added Autorest Issue KeyVault Client This issue points to a problem in the data-plane of the library. labels Aug 14, 2020
@chlowell chlowell added this to the Backlog milestone Aug 14, 2020
@iscai-msft
Copy link
Contributor

iscai-msft commented Aug 17, 2020

Have opened an issue for this in autorest: Azure/autorest.python#751

@chlowell
Copy link
Member Author

Closing this because the autorest issue is closed.

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Feb 24, 2021
Revert "[Hub Generated] Review request for Microsoft.Resources to add version stable/2021-01-01 (Azure#13000)" (Azure#13128)

This reverts commit 231d094.
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Feb 24, 2021
Revert "[Hub Generated] Review request for Microsoft.Resources to add version stable/2021-01-01 (Azure#13000)" (Azure#13128)

This reverts commit 231d094.
00Kai0 added a commit that referenced this issue Mar 1, 2021
* CodeGen from PR 13128 in Azure/azure-rest-api-specs
Revert "[Hub Generated] Review request for Microsoft.Resources to add version stable/2021-01-01 (#13000)" (#13128)

This reverts commit 231d094.

* test,version,CHANGELOG

* fix testcases

Co-authored-by: SDKAuto <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Autorest Issue Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

No branches or pull requests

2 participants