[codevoyager] fix: ChainerBackend falls through backends on PasswordDeleteError - #762
Open
codevoyager-ai-dev wants to merge 1 commit into
Open
[codevoyager] fix: ChainerBackend falls through backends on PasswordDeleteError#762codevoyager-ai-dev wants to merge 1 commit into
codevoyager-ai-dev wants to merge 1 commit into
Conversation
…ordDeleteError in delete_password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The method previously only caught
NotImplementedError, causingPasswordDeleteErrorfrom a higher-priority backend to propagate immediately without trying lower-priority backends. This meant that if a password was stored in a lower-priority backend (e.g. SecretService), but a higher-priority backend (e.g. DBusKeyring) was now available but did not have the password, the delete would fail withPasswordDeleteError: Password not found.Fix: Catch
PasswordDeleteErrorin addition toNotImplementedErrorindelete_password, so the chainer continues to the next backend when one raisesPasswordDeleteError.Testing:
test_delete_password_falls_through_on_password_delete_error— verifies fall-through when highest-priority backend raisesPasswordDeleteErrortest_delete_password_skips_not_implemented— verifies fall-through onNotImplementedError(existing behavior)Closes #697