mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-20 12:55:36 +02:00
more fixes
This commit is contained in:
committed by
Peter M. Elias
parent
d9ae0911b9
commit
f4122ff231
@@ -1016,14 +1016,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof z.ZodError) {
|
if (error instanceof z.ZodError) {
|
||||||
throw new Error(
|
throw new Error(`ZodErrors: ${JSON.stringify(error.errors)}`)
|
||||||
`Invalid arguments: ${error.errors
|
|
||||||
.map(
|
|
||||||
(e: z.ZodError["errors"][number]) =>
|
|
||||||
`${e.path.join(".")}: ${e.message}`
|
|
||||||
)
|
|
||||||
.join(", ")}`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const GitHubRepositorySchema = z.object({
|
|||||||
|
|
||||||
const GithubFileContentLinks = z.object({
|
const GithubFileContentLinks = z.object({
|
||||||
self: z.string(),
|
self: z.string(),
|
||||||
git: z.number().nullable(),
|
git: z.string().nullable(),
|
||||||
html: z.string().nullable()
|
html: z.string().nullable()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user