Something went wrong. Try again.
Stable episode delivery and analytics on pod.place
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930export class HttpError extends Error { constructor( public readonly status: number, public readonly code: string, message: string, ) { super(message); }}
export class RecordNotFound extends HttpError { constructor() { super(404, "record_not_found", "AT record not found"); }}
export function json(data: unknown, status = 200, headers: HeadersInit = {}): Response { return Response.json(data, { status, headers: { "Cache-Control": "no-store", "X-Content-Type-Options": "nosniff", ...headers }, });}
export function errorResponse(error: unknown): Response { if (error instanceof HttpError) { return json({ error: error.code, message: error.message }, error.status); } // Do not put credentials, request headers, record URLs, or listener IPs in logs. console.error("resolver operation failed", error instanceof Error ? error.name : "UnknownError"); return json({ error: "internal_error", message: "Resolver temporarily unavailable" }, 503);}