(response, label)
| 458 | |
| 459 | |
| 460 | def assert_rpc_cancelled(response, label): |
| 461 | error = response.get("error") |
| 462 | check( |
| 463 | isinstance(error, dict) and error.get("code") == -32800, |
| 464 | label + " did not return JSON-RPC request-cancelled: " + repr(response), |
| 465 | ) |
| 466 | check("result" not in response, label + " returned both error and result") |
| 467 | |
| 468 | |
| 469 | def start_ready_mcp_client( |