MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / parseBatchRequest

Function parseBatchRequest

services/db-proxy/src/utils/validation.ts:51–66  ·  view source on GitHub ↗
(body: unknown)

Source from the content-addressed store, hash-verified

49}
50
51export function parseBatchRequest(body: unknown):
52 | {
53 success: true;
54 data: BatchRequest;
55 }
56 | {
57 success: false;
58 error: string;
59 } {
60 const result = batchRequestSchema.safeParse(body);
61 if (!result.success) {
62 return { success: false, error: result.error.issues[0]?.message || 'Invalid request' };
63 }
64
65 return { success: true, data: result.data };
66}

Callers 2

validation.test.tsFile · 0.90
runtime.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected