{"record":{"id":"1b5a81c4a6443eb2","repo":"deepseek-ai/deepseek-harness","slug":"method-response-must-be-a-json-object","errorCode":null,"errorMessage":"{method} response must be a JSON object","messagePattern":"(.+?) response must be a JSON object","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"python/sdk/src/deepseek_harness/client.py","lineNumber":177,"sourceCode":"        method: str,\n        params: JsonObject | None,\n        *,\n        response_model: type[ModelT],\n        timeout_seconds: float | None = None,\n        on_notification: Callable[[Notification], None] | None = None,\n        notification_filter: NotificationFilter | None = None,\n        notification_subscription: \"NotificationSubscription | None\" = None,\n    ) -> ModelT:\n        result = self._request_raw(\n            method,\n            params,\n            timeout_seconds=timeout_seconds,\n            on_notification=on_notification,\n            notification_filter=notification_filter,\n            notification_subscription=notification_subscription,\n        )\n        if not isinstance(result, dict):\n            raise TypeError(f\"{method} response must be a JSON object\")\n        return response_model.model_validate(result)\n\n    def notify(self, method: str, params: JsonObject | None = None) -> None:\n        message: JsonObject = {\"jsonrpc\": \"2.0\", \"method\": method}\n        if params is not None:\n            message[\"params\"] = params\n        self._write_message(message)\n\n    def next_notification(self) -> Notification:\n        item = self._notifications.get()\n        if isinstance(item, BaseException):\n            raise item\n        return item\n\n    def subscribe_notifications(\n        self,\n        notification_filter: NotificationFilter | None = None,\n    ) -> \"NotificationSubscription\":","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/python/sdk/src/deepseek_harness/client.py#L159-L195","documentation":"Error \"{method} response must be a JSON object\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at python/sdk/src/deepseek_harness/client.py:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the runtime version matches the SDK protocol; the named method must return a JSON object response."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}