Skip to content

Commit f2bf4a9

Browse files
committed
wip
1 parent 2239274 commit f2bf4a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/clerk-js/src/core/clerk.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2732,7 +2732,12 @@ export class Clerk implements ClerkInterface {
27322732
const initEnvironmentPromise = Environment.getInstance()
27332733
.fetch({ touch: shouldTouchEnv })
27342734
.then(res => this.updateEnvironment(res))
2735-
.catch(() => {
2735+
.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+
27362741
++initializationDegradedCounter;
27372742
const environmentSnapshot = SafeLocalStorage.getItem<EnvironmentJSONSnapshot | null>(
27382743
CLERK_ENVIRONMENT_STORAGE_ENTRY,

0 commit comments

Comments
 (0)