{"record":{"id":"2e61baadd1561888","repo":"Comfy-Org/ComfyUI","slug":"expected-json-response-to-validate-into-a-pydantic","errorCode":null,"errorMessage":"Expected JSON response to validate into a Pydantic model, got non-JSON (binary or text).","messagePattern":"Expected JSON response to validate into a Pydantic model, got non-JSON \\(binary or text\\)\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/util/client.py","lineNumber":164,"sourceCode":"        final_label_on_success=final_label_on_success,\n        progress_origin_ts=progress_origin_ts,\n        monitor_progress=monitor_progress,\n        max_retries_on_rate_limit=max_retries_on_rate_limit,\n        is_rate_limited=is_rate_limited,\n    )\n    if not isinstance(raw, dict):\n        raise Exception(\"Expected JSON response to validate into a Pydantic model, got non-JSON (binary or text).\")\n    return _validate_or_raise(response_model, raw)\n\n","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/util/client.py#L146-L182","documentation":"Error \"Expected JSON response to validate into a Pydantic model, got non-JSON (binary or text).\" thrown in Comfy-Org/ComfyUI.","triggerScenarios":"Thrown at comfy_api_nodes/util/client.py:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; the endpoint returned a non-JSON response."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}