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.
2 parents f2aecb9 + a269f7b commit 7d257fcCopy full SHA for 7d257fc
frontend/context/app-init-context.tsx
@@ -48,11 +48,12 @@ export const AppInitProvider: FunctionComponent<PropsWithChildren> = ({
48
49
if (rumAccessToken && realm) {
50
getCurrentSession()
51
- .then(({ tokens }) => {
52
- const username = tokens?.idToken?.payload?.[
53
- "cognito:username"
54
- ] as string;
55
-
+ .then(
+ ({ tokens }) =>
+ tokens?.idToken?.payload?.["cognito:username"] as string,
+ )
+ .catch(() => "")
56
+ .then((username) => {
57
const splunkConfig = {
58
realm,
59
rumAccessToken,
@@ -67,7 +68,7 @@ export const AppInitProvider: FunctionComponent<PropsWithChildren> = ({
67
68
});
69
SplunkSessionRecorder.init(splunkConfig);
70
})
- .then(() => {
71
+ .finally(() => {
72
setIsInitialised(true);
73
74
} else {
0 commit comments