Skip to content

Conversation

@nikosdouvlis
Copy link
Member

Description

It's impossible to inspect the error that caused on error or the error event to be fired, so I intentionally left the initial and subsequent delays short.

This is a "best effort" strategy to retry network errors while still falling back to loading the turnstile script through our proxy if loading fails due to CSP, as we cannot reliably detect that a CSP error occurred.

This change is expected to reduce the "Clerk: Failed to load" errors as well.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2024

🦋 Changeset detected

Latest commit: 718c41c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@clerk/clerk-js Patch
@clerk/shared Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/tanstack-start Patch
@clerk/testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nikosdouvlis nikosdouvlis self-assigned this Oct 17, 2024
@nikosdouvlis nikosdouvlis requested a review from anagstef October 17, 2024 13:50
@nikosdouvlis nikosdouvlis merged commit 752ce9b into main Oct 17, 2024
6 checks passed
@nikosdouvlis nikosdouvlis deleted the nikos/user-875-loadscript-should-retry-if-initial-loading-fails branch October 17, 2024 14:14
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.

3 participants