Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-3583] Do not throw from checkSession #943

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Conversation

frederikprijck
Copy link
Member

Changes

Our SDK has a set of recoverable errors it swallows, the other errors are surfaced to the user. This has caused some confusion before, and as checkSession is a silent wrapper around getTokenSilently to see if a user can be obtained to initialize the SDK, it should swallow any exceptions. Any error probably indicates there is no user, and the SDK should behave as such. Once the user calls any of the other SDK methods (e.g. loginWithRedirect or getTokenSilently), it should surface the exact same error that was swallowed by checkSession.

Checklist

@frederikprijck frederikprijck marked this pull request as ready for review August 5, 2022 14:57
@frederikprijck frederikprijck requested a review from a team as a code owner August 5, 2022 14:57
@frederikprijck
Copy link
Member Author

Codecov has noticed a decrease of 0.01% in coverage because we removed code. We should be fine ignoring that.

@frederikprijck frederikprijck merged commit c08a81d into v2 Aug 9, 2022
@frederikprijck frederikprijck deleted the feat/sdk-3583 branch August 9, 2022 20:21
@frederikprijck frederikprijck mentioned this pull request Oct 25, 2022
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.

2 participants