{"record":{"id":"604e900a31f21cc6","repo":"calesthio/OpenMontage","slug":"jimeng-api-error-http-http-status-code-code","errorCode":null,"errorMessage":"Jimeng API error: HTTP {http_status}, code={code}, msg={msg}","messagePattern":"Jimeng API error: HTTP (.+?), code=(.+?), msg=(.+?)","errorType":"http","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/video/jimeng_video.py","lineNumber":405,"sourceCode":"    def _json_or_raise(response: Any) -> dict[str, Any]:\n        try:\n            return response.json()\n        except ValueError as exc:\n            raise RuntimeError(\n                f\"Non-JSON response from Jimeng API: HTTP {response.status_code}\"\n            ) from exc\n\n    @staticmethod\n    def _check_code(http_status: int, payload: dict[str, Any]) -> None:\n        if http_status < 400:\n            code = payload.get(\"code\", 10000)\n            if code == 10000:\n                return\n            msg = payload.get(\"message\", \"unknown error\")\n            raise RuntimeError(f\"Jimeng API error: code={code}, msg={msg}\")\n        code = payload.get(\"code\", \"unknown\")\n        msg = payload.get(\"message\", \"unknown error\")\n        raise RuntimeError(f\"Jimeng API error: HTTP {http_status}, code={code}, msg={msg}\")\n","sourceCodeStart":387,"sourceCodeEnd":406,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/jimeng_video.py#L387-L406","documentation":"Error \"Jimeng API error: HTTP {http_status}, code={code}, msg={msg}\" thrown in calesthio/OpenMontage.","triggerScenarios":"The Jimeng API returns an HTTP error status together with a business code and message in the response body.","commonSituations":"See trigger scenarios.","solutions":["Check the HTTP status: 401/403 means credentials, 429 means rate limit (back off and retry), 5xx means a Jimeng-side outage (retry later).","Use the code and msg fields to identify the specific failure and adjust the request accordingly."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}