Added an error to handle unsupported response types

This commit is contained in:
Joaquin Coromina
2025-05-19 16:00:07 -04:00
parent 3e63e89c58
commit 8699180fdf
@@ -387,17 +387,19 @@ export class MCPChannel implements IServerChannel {
}
}
if (returnValue.type === 'audio') {
// handle audio response
}
// if (returnValue.type === 'audio') {
// // handle audio response
// }
if (returnValue.type === 'image') {
// handle image response
}
// if (returnValue.type === 'image') {
// // handle image response
// }
if (returnValue.type === 'resource') {
// handle resource response
}
// if (returnValue.type === 'resource') {
// // handle resource response
// }
throw new Error(`Tool call error: We don\'t support ${returnValue.type} tool response yet for server ${serverName} and tool ${toolName}`)
}
// tool call error wrapper