diff options
author | mat <github@matdoes.dev> | 2022-03-20 13:56:00 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-20 13:56:00 -0500 |
commit | fb0aea815ed9abc6247512992c796caaf989ed05 (patch) | |
tree | 7d827cc9f776425d0cc327e3e0360fa89b8e09f3 | |
parent | 27b335981c3a8b3d701426881d409e0fdc256a04 (diff) | |
download | skyblock-stats-fb0aea815ed9abc6247512992c796caaf989ed05.tar.gz skyblock-stats-fb0aea815ed9abc6247512992c796caaf989ed05.tar.bz2 skyblock-stats-fb0aea815ed9abc6247512992c796caaf989ed05.zip |
incredible debugging
-rw-r--r-- | src/routes/leaderboards/[name].svelte | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/routes/leaderboards/[name].svelte b/src/routes/leaderboards/[name].svelte index 1c20b2c..2736e7a 100644 --- a/src/routes/leaderboards/[name].svelte +++ b/src/routes/leaderboards/[name].svelte @@ -3,7 +3,11 @@ import { API_URL } from '$lib/api' export const load: Load = async ({ params, fetch }) => { - const data = await fetch(`${API_URL}leaderboards/${params.name}`).then(r => r.json()) + const dataText = await fetch(`${API_URL}leaderboards/${params.name}`).then(r => r.text()) + + throw Error(dataText) + + const data = JSON.parse(dataText) if (data.list.length === 0) return { fallthrough: true } as unknown |