Skip to content

Configure reporting potential errors encountered during configuration call - #406

Merged
jhaven-stytch merged 4 commits into
mainfrom
jordan/configure-reporting
Feb 5, 2026
Merged

Configure reporting potential errors encountered during configuration call#406
jhaven-stytch merged 4 commits into
mainfrom
jordan/configure-reporting

Conversation

@jhaven-stytch

Copy link
Copy Markdown
Contributor

Changes:

  1. Instead of just reporting "true" when configuration has finished, return a new InitializationStatus class that gives visibility into if it was completely successful, or if there were any errors. In the case of errors, we silently allow them and fallback to default values. This way, developers know if something went wrong.
  2. Previously, we rejected multiple attempts to configure the Stytch client (because it's a heavy operation). However, if something went wrong, a developer might want to retry, so we let them. Keep the warning, though, because it's still true
  3. Updates tests as appropriate (no more short circuit tests)

Notes:

Checklist:

  • I have verified that this change works in the relevant demo app, or N/A
  • I have added or updated any tests relevant to this change, or N/A
  • I have updated any relevant README files for this change, or N/A

… Also, allow calling configure multiple times (in case configuration failed the first time), which should be safe, since we're guarding around the session storage creation
@jhaven-stytch

Copy link
Copy Markdown
Contributor Author

Code Coverage

Overall Project 71.55% -0.27% 🍏
Files changed 75.16%

File Coverage
ConfigurationManager.kt 84.01% -7.4% 🍏
InitializationStatus.kt 66.67% -33.33%
StytchClient.kt 65.63% -1.55%
StytchB2BClient.kt 59% -1.27%

@jhaven-stytch
jhaven-stytch requested review from yzhang-stytch and removed request for mxbaylee February 3, 2026 22:21
@jhaven-stytch
jhaven-stytch merged commit 38297b9 into main Feb 5, 2026
4 checks passed
@jhaven-stytch
jhaven-stytch deleted the jordan/configure-reporting branch February 5, 2026 16:56
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