MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / handle

Method handle

packages/baseai/src/dev/hono/errors.ts:166–182  ·  view source on GitHub ↗
({
		code,
		result,
		message
	}: {
		code: ErrorCodesType;
		result: ReturnType<AnyZodObject['safeParse']>;
		message?: string;
	})

Source from the content-addressed store, hash-verified

164
165 // Helper static method to simplify throwing errors
166 static handle({
167 code,
168 result,
169 message
170 }: {
171 code: ErrorCodesType;
172 result: ReturnType<AnyZodObject['safeParse']>;
173 message?: string;
174 }) {
175 if (!result.success) {
176 throw new ApiErrorZod({
177 code,
178 validationResult: result,
179 customMessage: message
180 });
181 }
182 }
183}
184
185/**

Callers 1

validateFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected