From aff0c03ad2f47e47981dfdc4d4f0a26f883c93dc Mon Sep 17 00:00:00 2001 From: Alessio Davoli Date: Fri, 22 Dec 2023 13:34:40 +0100 Subject: [PATCH] Add status to hooks --- frontend/src/hooks.client.ts | 1 + frontend/src/hooks.server.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks.client.ts b/frontend/src/hooks.client.ts index 7583362..0cc9495 100644 --- a/frontend/src/hooks.client.ts +++ b/frontend/src/hooks.client.ts @@ -1,6 +1,7 @@ export async function handleError({ error, event, status, message }) { console.error(error) return { + status, message }; } \ No newline at end of file diff --git a/frontend/src/hooks.server.ts b/frontend/src/hooks.server.ts index 0e702e0..6588983 100644 --- a/frontend/src/hooks.server.ts +++ b/frontend/src/hooks.server.ts @@ -8,8 +8,8 @@ export async function handleFetch({ request, fetch }) { } export async function handleError({ error, event, status, message }) { - console.error(error) return { + status, message }; } \ No newline at end of file