Skip to content

feat(keyring-controller): add isKeyringNotFoundError#8351

Draft
ccharly wants to merge 1 commit intomainfrom
cc/feat/keyring-controller-is-error
Draft

feat(keyring-controller): add isKeyringNotFoundError#8351
ccharly wants to merge 1 commit intomainfrom
cc/feat/keyring-controller-is-error

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Mar 31, 2026

Explanation

Adding this helper so we can use it in combination with withKeyring, e.g:

try {
  await controller.withKeyring({ type: 'something' }, ({ keyring }) => {
    ...
  });
} catch (error) {
  if (isKeyringNotFoundError(error)) {
    await controller.addNewKeyring('something');
  }
}

// We can retry to use `withKeyring` now.

References

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@ccharly ccharly force-pushed the cc/feat/keyring-controller-is-error branch from 0000ae7 to 94c81b8 Compare March 31, 2026 12:49
@ccharly ccharly changed the title feat(keyring-controller): add isKeyringNotFoundError feat(keyring-controller): add isKeyringNotFoundError Mar 31, 2026
@ccharly ccharly force-pushed the cc/feat/keyring-controller-is-error branch from 94c81b8 to c9f3c82 Compare March 31, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant