MCPcopy Create free account
hub / github.com/hashintel/hash / validationErrorBody

Function validationErrorBody

apps/petrinaut-website/api/chat.ts:55–60  ·  view source on GitHub ↗
(
  error: unknown,
)

Source from the content-addressed store, hash-verified

53};
54
55const validationErrorBody = (
56 error: unknown,
57): { error: string; detail?: string } =>
58 process.env.VERCEL_ENV === "production" || !(error instanceof Error)
59 ? { error: "Invalid chat messages" }
60 : { error: "Invalid chat messages", detail: error.message };
61
62/**
63 * Resolve the public client IP for rate-limiting.

Callers 1

fetchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected