diff --git a/web/src/lib/stores/trail_store.ts b/web/src/lib/stores/trail_store.ts index f12de419..b9feda92 100644 --- a/web/src/lib/stores/trail_store.ts +++ b/web/src/lib/stores/trail_store.ts @@ -43,12 +43,12 @@ export async function trails_recommend(size: number, f: (url: RequestInfo | URL, }), { method: 'GET', }) - const response: Trail[] = await r.json() if (!r.ok) { const response = await r.json(); throw new APIError(r.status, response.message, response.detail) } + const response: Trail[] = await r.json() return response;