Skip to content

Commit 8d22cbf

Browse files
Use canonical names in batch fetch errors
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 174a507 commit 8d22cbf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/mcp/src/server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('get_component_batch', () => {
8686
it('returns missing components and fetch failures in-band', async () => {
8787
vi.mocked(fetch).mockResolvedValue(new Response(null, {status: 500}))
8888

89-
const result = await callBatch(['MissingComponent', 'Button'])
89+
const result = await callBatch(['MissingComponent', 'button'])
9090

9191
expect(result.isError).not.toBe(true)
9292
expect(result.content).toEqual([

packages/mcp/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ server.registerTool(
219219

220220
return {
221221
type: 'text' as const,
222-
text: `## ${name}\n\nStatus: fetch-error. Failed to load documentation for ${name}.`,
222+
text: `## ${match.name}\n\nStatus: fetch-error. Failed to load documentation for ${match.name}.`,
223223
}
224224
}),
225225
)

0 commit comments

Comments
 (0)