Skip to content

SecretState class to have a verbose catch mechanism #147760

Closed

Description

Noticed that the retrieval of the token method defined here within the api/browser/mainThreadSecretState.ts throws a very generic error,

   throw new Error('Cannot get password');

We can see that some of our users are seeing this error using our plugin that uses SecretStorage to manage tokens. But without any further details other than Cannot get password, it is hard for us to recreate or pin point why exactly this error is thrown. For now we have wrapped this within a try/catch block and if there is an error the token is cleared from the SecretStorage but would still love to understand if there is a way we can prevent this error.

Would it be possible to implement a bit more verbose catch mechanism that pin points what actually goes wrong during the token retrieval for this error to be thrown?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

authenticationIssues with the Authentication platformdebtCode quality issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions