fix(accounts): roll back orphaned keyring secret on add_account failure #229

Merged
KofTwentyTwo merged 1 commits from story/m5-s4-orphaned-keyring-cleanup into dev 2026-07-30 01:12:18 +00:00
1 Commits
Author SHA1 Message Date
James Maes 4713e5a65c fix(accounts): roll back orphaned keyring secret on add_account failure
If set_secret succeeds but the subsequent save_account fails, the
credential was left in the keyring with no account row referencing it.
add_account now deletes the just-written secret before returning,
appending any rollback-delete failure to the original error message
without masking it.

Refs #197, #169
2026-07-29 20:10:02 -05:00