more fixes

This commit is contained in:
Peter M Elias
2024-12-28 01:11:04 -08:00
committed by Peter M. Elias
parent d9ae0911b9
commit f4122ff231
2 changed files with 2 additions and 9 deletions

View File

@@ -1016,14 +1016,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
}
} catch (error) {
if (error instanceof z.ZodError) {
throw new Error(
`Invalid arguments: ${error.errors
.map(
(e: z.ZodError["errors"][number]) =>
`${e.path.join(".")}: ${e.message}`
)
.join(", ")}`
);
throw new Error(`ZodErrors: ${JSON.stringify(error.errors)}`)
}
throw error;
}