diff --git a/client/src/utils/ajax.ts b/client/src/utils/ajax.ts index 088edd5a104..a02ab0b39f4 100644 --- a/client/src/utils/ajax.ts +++ b/client/src/utils/ajax.ts @@ -153,7 +153,7 @@ export function getSessionUser( signal?: AbortSignal ): Promise> { const responseWithData: Promise> = get( - '/user/get-session-user', + '/user/session-user', signal ); // TODO: Once DB is migrated, no longer need to parse `files` -> `challengeFiles` etc. diff --git a/e2e/flash.spec.ts b/e2e/flash.spec.ts index ffb5046a97a..c6426ef09f5 100644 --- a/e2e/flash.spec.ts +++ b/e2e/flash.spec.ts @@ -42,10 +42,13 @@ test.describe('Flash Message component E2E test', () => { }); test('should be visible when a network error occurs', async ({ page }) => { - await page.route( - '*/**/user/get-session-user', - async route => await route.fulfill({ status: 500 }) - ); + await page.route('*/**/user/session-user', async route => { + await route.fulfill({ + status: 500, + contentType: 'application/json', + body: JSON.stringify({ user: {}, result: '' }) + }); + }); await page.goto('/'); await checkFlashMessageVisibility(