import type { RequestHandler } from './$types'; import { getPool } from '$lib/server/pipeline/startup.js'; import { handleServiceError } from '$lib/server/utils/validation.js'; export const GET: RequestHandler = () => { try { const pool = getPool(); if (!pool) { return new Response('Service unavailable', { status: 503 }); } return Response.json(pool.getStatus()); } catch (error) { return handleServiceError(error); } };