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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse backend errors that don't throw exceptions. #2423

Merged
merged 1 commit into from Dec 20, 2023

Conversation

Nikpolik
Copy link
Contributor

Description

This PR fixes an issue where errors returned from backend api requests are not converted to camelCase.

Screenshot 2023-12-19 at 2 03 12 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:

Packages affected

  • @clerk/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

Copy link

changeset-bot bot commented Dec 20, 2023

馃 Changeset detected

Latest commit: 4a07eac

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

This PR includes changesets to release 6 packages
Name Type
@clerk/backend Patch
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node 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

@Nikpolik Nikpolik self-assigned this Dec 20, 2023
@Nikpolik Nikpolik force-pushed the nikpolik/parse-backend-errors branch 2 times, most recently from 2c323e9 to 9b2ac6d Compare December 20, 2023 18:41
@dimkl
Copy link
Member

dimkl commented Dec 20, 2023

@Nikpolik could you provide a test for this fix? What is the expected returned error?

@Nikpolik
Copy link
Contributor Author

Nikpolik commented Dec 20, 2023

@Nikpolik could you provide a test for this fix? What is the expected returned error?

Its exactly the same but camel cased

Screenshot 2023-12-20 at 9 37 37 PM

which matches the ClerkAPIError interface and the return type

Yes I'll add a test in the factory!

@Nikpolik Nikpolik force-pushed the nikpolik/parse-backend-errors branch from 9b2ac6d to 4a07eac Compare December 20, 2023 20:56
@dimkl dimkl added this pull request to the merge queue Dec 20, 2023
Merged via the queue into main with commit bad4de1 Dec 20, 2023
7 checks passed
@dimkl dimkl deleted the nikpolik/parse-backend-errors branch December 20, 2023 22:28
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.

None yet

4 participants