Skip to content

Commit e1a2654

Browse files
authored
fix(backend): Remove console error message from refresh token flow failures (#4351)
1 parent 1647b9e commit e1a2654

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.changeset/fair-flies-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/backend": patch
3+
---
4+
5+
Remove console error message from refresh token flow failures.

packages/backend/src/tokens/request.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,7 @@ ${error.getFullMessage()}`,
629629
return signedIn(authenticateContext, data.jwtPayload, undefined, data.sessionToken);
630630
}
631631

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

0 commit comments

Comments
 (0)