diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/routes/loggedin/+server.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/loggedin/+server.ts b/src/routes/loggedin/+server.ts index e493f10..8b903df 100644 --- a/src/routes/loggedin/+server.ts +++ b/src/routes/loggedin/+server.ts @@ -13,10 +13,10 @@ export const GET = (async ({ url, cookies }) => { code, redirectUri: redirectUri }), - }).then(res => { + }).then(async res => { if (res.status !== 200) - throw error(500, `Non-200 response from API: ${res.status} ${res.text}`) - return res.json() + throw error(500, `Non-200 response from API: ${res.status} ${await res.text()}`) + return await res.json() }) if (response.ok) { |