Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2f8b96 commit baee720Copy full SHA for baee720
packages/stack-shared/src/utils/jwt.tsx
@@ -4,7 +4,7 @@ import * as jose from "jose";
4
import { JOSEError } from "jose/errors";
5
import { encodeBase64Url } from "./bytes";
6
import { getEnvVariable } from "./env";
7
-import { StackAssertionError } from "./errors";
+import { StackAssertionError, errorToNiceString } from "./errors";
8
import { globalVar } from "./globals";
9
import { pick } from "./objects";
10
import { Result } from "./results";
@@ -26,7 +26,7 @@ export async function getJwtInfo(options: {
26
const decodedJwt = jose.decodeJwt(options.jwt);
27
return Result.ok({ payload: decodedJwt });
28
} catch (e) {
29
- return Result.error(e);
+ return Result.error(errorToNiceString(e));
30
}
31
32
0 commit comments