We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2239274 commit f2bf4a9Copy full SHA for f2bf4a9
packages/clerk-js/src/core/clerk.ts
@@ -2732,7 +2732,12 @@ export class Clerk implements ClerkInterface {
2732
const initEnvironmentPromise = Environment.getInstance()
2733
.fetch({ touch: shouldTouchEnv })
2734
.then(res => this.updateEnvironment(res))
2735
- .catch(() => {
+ .catch(err => {
2736
+ // Let 4xx errors (like dev_browser_unauthenticated) bubble up to be handled by retry logic
2737
+ if (is4xxError(err)) {
2738
+ throw err;
2739
+ }
2740
+
2741
++initializationDegradedCounter;
2742
const environmentSnapshot = SafeLocalStorage.getItem<EnvironmentJSONSnapshot | null>(
2743
CLERK_ENVIRONMENT_STORAGE_ENTRY,
0 commit comments