MCPcopy Create free account
hub / github.com/pollinations/pollinations / createValidationErrorResponse

Function createValidationErrorResponse

shared/error.ts:275–285  ·  view source on GitHub ↗
(
    error: ValidationError,
    status: ContentfulStatusCode,
    timestamp: string,
)

Source from the content-addressed store, hash-verified

273}
274
275function createValidationErrorResponse(
276 error: ValidationError,
277 status: ContentfulStatusCode,
278 timestamp: string,
279): ErrorResponse {
280 const flatErrors = z.flattenError(error.zodError);
281 return createErrorResponse(error, status, timestamp, {
282 name: error.name,
283 ...flatErrors,
284 });
285}
286
287function createInternalErrorResponse(
288 error: Error,

Callers 1

handleErrorFunction · 0.85

Calls 1

createErrorResponseFunction · 0.85

Tested by

no test coverage detected