Skip to content

Commit

Permalink
return the caught error in the error message
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate committed Jan 23, 2025
1 parent bdc3f5a commit 98a7249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JWT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ export function decodeJWT(jwt: string, recurse = true): JWTDecoded {
return innerDecodedJwt
}
return decodedJwt
} catch (e) {
throw new Error('invalid_argument: Incorrect format JWT')
} catch (e: any) {

Check failure on line 201 in src/JWT.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
throw new Error(`invalid_argument: ${JWT_ERROR.INVALID_JWT}: ${e}`)
}
}

Expand Down

0 comments on commit 98a7249

Please sign in to comment.