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

chore(nextjs): Improve observability on keyless failures #5325

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Mar 11, 2025

Description

This PR abstracts the keyless implementation under the KeylessProvider (RSC) and also allows for logs to be displayed when <ClerkProvide debug/> for data related to keyless. I remind you that when keyless fails for any reason, we display an error the a PK needs to be provided, since this is the action the developer needs to perform in order to proceed.

In cases where keyless is expected to work, but fails to do so, it is usefully to have such logs to determine, what makes the feature to fail.

Checklist

  • pnpm test runs as expected.
  • pnpm 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:

Copy link

vercel bot commented Mar 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2025 1:17pm

Copy link

changeset-bot bot commented Mar 11, 2025

🦋 Changeset detected

Latest commit: 3f1803d

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

This PR includes changesets to release 1 package
Name Type
@clerk/nextjs Minor

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

const accountlessApplication = await client.__experimental_accountlessApplications
.createAccountlessApplication()
.catch(() => null);
const accountlessApplication = await client.__experimental_accountlessApplications.createAccountlessApplication();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let the error bubble up, catch it and log it.

Comment on lines +25 to +28
/**
*
*/
debug?: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a generic CLERK_DEBUG env var ?

@panteliselef panteliselef marked this pull request as ready for review March 17, 2025 13:08
@panteliselef panteliselef requested a review from a team March 17, 2025 13:13
@panteliselef
Copy link
Member Author

I am closing this, the refactor was done in here #5389 and we decided to pass on the debug prop. This might return as part of debug-logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants