From 54e2fc2fe614db8d342f84807a4d31552c5e0cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20H=C3=A5land?= <4449863+palhaland@users.noreply.github.com> Date: Fri, 8 May 2026 22:19:43 +0200 Subject: [PATCH] fix: error handling fallback in search endpoints (#961) --- web/src/routes/api/v1/search/[index]/+server.ts | 2 +- web/src/routes/api/v1/search/multi/+server.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/routes/api/v1/search/[index]/+server.ts b/web/src/routes/api/v1/search/[index]/+server.ts index fb5c4b02..663b8b38 100644 --- a/web/src/routes/api/v1/search/[index]/+server.ts +++ b/web/src/routes/api/v1/search/[index]/+server.ts @@ -48,6 +48,6 @@ export async function POST(event: RequestEvent) { } catch (e: any) { console.error(e); - throw error(e.httpStatus, e) + throw error(e.httpStatus || 500, e) } } \ No newline at end of file diff --git a/web/src/routes/api/v1/search/multi/+server.ts b/web/src/routes/api/v1/search/multi/+server.ts index a557c4ba..205d3ae8 100644 --- a/web/src/routes/api/v1/search/multi/+server.ts +++ b/web/src/routes/api/v1/search/multi/+server.ts @@ -42,6 +42,7 @@ export async function POST(event: RequestEvent) { }); return json(r); } catch (e: any) { - throw error(e.httpStatus, e) + console.error(e); + throw error(e.httpStatus || 500, e) } } \ No newline at end of file