Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit baee720

Browse files
committed
JWT update
1 parent b2f8b96 commit baee720

File tree

1 file changed

+2
-2
lines changed
  • packages/stack-shared/src/utils

1 file changed

+2
-2
lines changed

packages/stack-shared/src/utils/jwt.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as jose from "jose";
44
import { JOSEError } from "jose/errors";
55
import { encodeBase64Url } from "./bytes";
66
import { getEnvVariable } from "./env";
7-
import { StackAssertionError } from "./errors";
7+
import { StackAssertionError, errorToNiceString } from "./errors";
88
import { globalVar } from "./globals";
99
import { pick } from "./objects";
1010
import { Result } from "./results";
@@ -26,7 +26,7 @@ export async function getJwtInfo(options: {
2626
const decodedJwt = jose.decodeJwt(options.jwt);
2727
return Result.ok({ payload: decodedJwt });
2828
} catch (e) {
29-
return Result.error(e);
29+
return Result.error(errorToNiceString(e));
3030
}
3131
}
3232

0 commit comments

Comments
 (0)