Skip to content

Commit

Permalink
Log message when failing to decode JWT (#30315)
Browse files Browse the repository at this point in the history
*

GitOrigin-RevId: 74b36f04ce3221cf9202ca5438d2eeb2e0a5658e
  • Loading branch information
sshader authored and Convex, Inc. committed Oct 6, 2024
1 parent 8d7760b commit 56e6a8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/browser/sync/authentication_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ export class AuthenticationManager {
private decodeToken(token: string) {
try {
return jwtDecode(token);
} catch {
} catch (e) {
this._logVerbose(
`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`,
);
return null;
}
}
Expand Down

0 comments on commit 56e6a8b

Please sign in to comment.