Skip to content

Commit

Permalink
fix(backend): Remove console error message from refresh token flow fa…
Browse files Browse the repository at this point in the history
…ilures (#4351)
  • Loading branch information
anagstef authored Oct 17, 2024
1 parent 1647b9e commit e1a2654
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-flies-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/backend": patch
---

Remove console error message from refresh token flow failures.
3 changes: 1 addition & 2 deletions packages/backend/src/tokens/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ ${error.getFullMessage()}`,
return signedIn(authenticateContext, data.jwtPayload, undefined, data.sessionToken);
}

// If there's any error, simply fallback to the handshake flow.
console.error('Clerk: unable to refresh token:', error?.message || error);
// If there's any error, simply fallback to the handshake flow including the reason as a query parameter.
if (error?.cause?.reason) {
refreshError = error.cause.reason;
} else {
Expand Down

0 comments on commit e1a2654

Please sign in to comment.