{"record":{"id":"881521e3831ee297","repo":"rohitg00/ai-engineering-from-scratch","slug":"unsupported-input-request-method","errorCode":null,"errorMessage":"unsupported input request: {method}","messagePattern":"unsupported input request: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py","lineNumber":590,"sourceCode":"            method = request.get(\"method\")\n            if method == \"roots/list\":\n                responses[key] = {\n                    \"roots\": [{\"uri\": \"file:///workspace\", \"name\": \"Workspace\"}],\n                }\n            elif method == \"sampling/createMessage\":\n                responses[key] = {\n                    \"role\": \"assistant\",\n                    \"content\": {\"type\": \"text\", \"text\": \"Check correctness and rollback risk.\"},\n                    \"model\": \"study-model\",\n                    \"stopReason\": \"endTurn\",\n                }\n            elif method == \"elicitation/create\":\n                responses[key] = {\n                    \"action\": \"accept\",\n                    \"content\": {\"goal\": \"find correctness risks\"},\n                }\n            else:\n                raise ValueError(f\"unsupported input request: {method}\")\n        return responses\n\n\ndef streamable_http_profile() -> dict[str, Any]:\n    return {\n        \"endpoint\": \"/mcp\",\n        \"method\": \"POST\",\n        \"oneMessagePerPost\": True,\n        \"protocolSessions\": False,\n        \"responseTypes\": [\"application/json\", \"text/event-stream\"],\n        \"requestScopedSSE\": True,\n        \"changeNotifications\": \"subscriptions/listen\",\n        \"supportsGetStream\": False,\n        \"supportsDeleteSession\": False,\n        \"supportsLastEventId\": False,\n    }\n\n","sourceCodeStart":572,"sourceCodeEnd":608,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py#L572-L608","documentation":"Error \"unsupported input request: {method}\" thrown in rohitg00/ai-engineering-from-scratch.","triggerScenarios":"Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:590 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"39ea8a1c6d0b61f071226eff7ede4d4105fed820","analyzedAt":"2026-08-26T03:13:46.626Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}