Skip to content

Commit

Permalink
feat(healthcheck): return json on error
Browse files Browse the repository at this point in the history
  • Loading branch information
klevente committed Jul 24, 2024
1 parent d8c09ae commit c39eeba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dashboard/app/routes/healthcheck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
return new Response(JSON.stringify({ status: "ok" }));
} catch (error: unknown) {
console.log("healthcheck ❌", { error });
return new Response("ERROR", { status: 500 });
return new Response(JSON.stringify({ status: "unhealthy" }), {
status: 500,
});
}
}

0 comments on commit c39eeba

Please sign in to comment.