Skip to content

Commit

Permalink
fix: improve invalid JWT Error message (#321)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate authored Jan 23, 2025
1 parent bdc3f5a commit 560ab41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JWT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function decodeJWT(jwt: string, recurse = true): JWTDecoded {
}
return decodedJwt
} catch (e) {
throw new Error('invalid_argument: Incorrect format JWT')
throw new Error(`invalid_argument: ${JWT_ERROR.INVALID_JWT}: ${e}`)
}
}

Expand Down

0 comments on commit 560ab41

Please sign in to comment.