diff --git a/frontend/src/app.d.ts b/frontend/src/app.d.ts index f475253..77f1626 100644 --- a/frontend/src/app.d.ts +++ b/frontend/src/app.d.ts @@ -4,7 +4,6 @@ declare global { namespace App { export interface Error { message: string; - errorId: string; } // interface Locals {} // interface PageData {} diff --git a/frontend/src/routes/+page.ts b/frontend/src/routes/+page.ts index c642531..2bb37d4 100644 --- a/frontend/src/routes/+page.ts +++ b/frontend/src/routes/+page.ts @@ -1,17 +1,16 @@ - import { error } from '@sveltejs/kit'; -import {PUBLIC_BACKEND_URL} from '$env/static/public'; +import { PUBLIC_BACKEND_URL } from '$env/static/public'; const API_URL = `${PUBLIC_BACKEND_URL}/api`; export async function load({ fetch }) { - let categories = []; - try { - const response = await fetch(`${API_URL}/route-categories`); - categories = await response.json(); - } catch (ex) { - error(404, "API Not Found"); - } + let categories = []; + try { + const response = await fetch(`${API_URL}/route-categories`); + categories = await response.json(); + } catch (ex) { + error(404, { message: 'API Not Found'}); + } - return { categories }; -} \ No newline at end of file + return { categories }; +}