Uh oh!
There was an error while loading. Please reload this page.
Fix backend error message details - #2421
Merged
nikosdouvlis merged 1 commit intoJan 8, 2024
Merged
Conversation
🦋 Changeset detectedLatest commit: d98ed12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
Nikpolikforce-pushed
the
nikpolik/v4-fix-backend-error-message-details
branch
from
December 20, 2023 15:39
cc48c63 to
ff516a8Compare| errors: null, | ||
| }; | ||
| } catch (err) { | ||
| } catch (err: any) { |
Contributor
There was a problem hiding this comment.
Suggested change
| }catch(err: any){ | |
| }catch(err: unknown){ |
ContributorAuthor
There was a problem hiding this comment.
This was done on purpose. Since the result is passed to with withLegacyReturn all type safety is gone here. I can fix the types as well but wanted to get the fix out quick.
Uh oh!
There was an error while loading. Please reload this page.
Nikpolikforce-pushed
the
nikpolik/v4-fix-backend-error-message-details
branch
2 times, most recently
from
December 21, 2023 15:39
6561462 to
6d3958eCompareThis was caused by API errors beeing parsed twice. Once in the response error handling and again when initializing a new ClerkAPIResponseError.
Nikpolikforce-pushed
the
nikpolik/v4-fix-backend-error-message-details
branch
from
December 21, 2023 15:43
6d3958e to
d98ed12CompareContributorAuthor
@SokratisVidros I updated the fix a bit to make it simpler, also added a test for this case (its present in v5) |
nikosdouvlis
approved these changes
Jan 8, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This was caused by API errors being parsed twice. Once in the response error handling code and again when initializing a new
ClerkAPIResponseError.This is was fixed in v5 with the removal of
ClerkAPIResponseError.ClerkAPIResponseErroris also used by clerk-js the change was to the backend package.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore