diff options
author | mat <github@matdoes.dev> | 2022-12-24 19:32:15 -0600 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-12-24 19:32:15 -0600 |
commit | c4ebc9ccd9332928197c72903b72dd0161e55cdb (patch) | |
tree | 52c86047fd111472401a4ecf2e50961868451d4e | |
parent | 5463b1aad033405e9c0499304b553155b7c6484b (diff) | |
download | skyblock-stats-c4ebc9ccd9332928197c72903b72dd0161e55cdb.tar.gz skyblock-stats-c4ebc9ccd9332928197c72903b72dd0161e55cdb.tar.bz2 skyblock-stats-c4ebc9ccd9332928197c72903b72dd0161e55cdb.zip |
fix error not showing text lol
-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) { |