Skip to content

[Key Vault] Add default value for inner_error#46315

Merged
mccoyp merged 1 commit intoAzure:mainfrom
mccoyp:kv-optional-innererror
Apr 14, 2026
Merged

[Key Vault] Add default value for inner_error#46315
mccoyp merged 1 commit intoAzure:mainfrom
mccoyp:kv-optional-innererror

Conversation

@mccoyp
Copy link
Copy Markdown
Member

@mccoyp mccoyp commented Apr 14, 2026

Description

#41965 handled the edge case where inner_error is None, but didn't introduce a default value for the parameter; the model shouldn't be created by users, so the _from_error_bundle method should be the only place where a CertificateOperationError is constructed. However, for consistency with the type hint and to prevent unnecessary errors, this adds a default None value for the argument.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@mccoyp mccoyp requested a review from a team as a code owner April 14, 2026 21:30
@mccoyp mccoyp added the Client This issue points to a problem in the data-plane of the library. label Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 21:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Key Vault Certificates public model CertificateOperationError to make its inner_error parameter optional by providing a default value of None, aligning runtime behavior with its type hint and preventing unnecessary instantiation errors when no inner error is present.

Changes:

  • Add a default value (None) for the inner_error parameter in CertificateOperationError.__init__.

@mccoyp
Copy link
Copy Markdown
Member Author

mccoyp commented Apr 14, 2026

/check-enforcer override

CI failures are unrelated, though they should be addressed soon in a different PR.

@mccoyp
Copy link
Copy Markdown
Member Author

mccoyp commented Apr 14, 2026

/check-enforcer override

@mccoyp mccoyp merged commit 6b9ea94 into Azure:main Apr 14, 2026
24 of 28 checks passed
@mccoyp mccoyp deleted the kv-optional-innererror branch April 14, 2026 22:28
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Azure SDK for Key Vault Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Client This issue points to a problem in the data-plane of the library. KeyVault

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants