Skip to content

Conversation

@panteliselef
Copy link
Member

Description

Use FAPI error long message instead of statusText when throwing API errors
Also a customized error for using production keys in dev is added.

Before

Screenshot 2024-11-07 at 1 31 44 PM

After

Screenshot 2024-11-07 at 1 30 57 PM

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:

Customized error for using production keys in dev.
@panteliselef panteliselef requested a review from a team November 7, 2024 11:31
@panteliselef panteliselef self-assigned this Nov 7, 2024
@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2024

🦋 Changeset detected

Latest commit: d309959

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

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo 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

);
}

throw new ClerkAPIResponseError(safeErrorMessage || statusText, {
Copy link
Member Author

Choose a reason for hiding this comment

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

  1. statusText was empty most of the time (not sure why, status was populated)
  2. We do have a custom toString() for ClerkAPIResponseError but that is not guaranteed to be called.

@panteliselef panteliselef merged commit 152019b into main Nov 11, 2024
23 checks passed
@panteliselef panteliselef deleted the elef/sdki-727-improve-error-message-feedback-when-running-on-local-with branch November 11, 2024 16:08
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
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.

5 participants