Skip to content

Commit

Permalink
fix(shared): Removal of clerkError property
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Oct 6, 2023
1 parent de5e2f5 commit f6af3fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-donuts-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/shared': patch
---

Revert the removal of the `clerkError` property from `ClerkAPIError` class.
3 changes: 3 additions & 0 deletions packages/shared/src/errors/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export function parseError(error: ClerkAPIErrorJSON): ClerkAPIError {
}

export class ClerkAPIResponseError extends Error {
clerkError: true;

status: number;
message: string;

Expand All @@ -80,6 +82,7 @@ export class ClerkAPIResponseError extends Error {

this.status = status;
this.message = message;
this.clerkError = true;
this.errors = parseErrors(data);
}

Expand Down

0 comments on commit f6af3fc

Please sign in to comment.