so, basically I have an API route which throws error (500) only in prod, it works fine on dev server, I even built the app locally but it works just fine.
Code -
import type { NextRequest } from "next/server";
import { getAnalytics } from "../../lib/umami";
export const config = {
runtime: "experimental-edge",
};
type UmamiResponse = {
pageviews: {
value: number;
};
uniques: {
value: number;
};
};
export default async function handler(req: NextRequest) {
const resp = await getAnalytics();
const analytics = (await resp.json()) as UmamiResponse;