swadhinbiswas Fix: Add date validation in analysis.ts to prevent RangeError · 1/20/2026
a7662cd
13 lines · 344 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
import { register } from "@/lib/metrics";
import type { APIRoute } from "astro";
import { withErrorHandler } from "@/lib/errors";

export const GET: APIRoute = withErrorHandler(async () => {
  const metrics = await register.metrics();
  return new Response(metrics, {
    headers: {
      "Content-Type": register.contentType,
    },
  });
});