{"record":{"id":"bf1f591ba3ebc8e7","repo":"calesthio/OpenMontage","slug":"jimeng-api-error-code-code-msg-msg","errorCode":null,"errorMessage":"Jimeng API error: code={code}, msg={msg}","messagePattern":"Jimeng API error: code=(.+?), msg=(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"tools/video/jimeng_video.py","lineNumber":402,"sourceCode":"        return msg\n\n    @staticmethod\n    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":384,"sourceCodeEnd":406,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/jimeng_video.py#L384-L406","documentation":"Error \"Jimeng API error: code={code}, msg={msg}\" thrown in calesthio/OpenMontage.","triggerScenarios":"The Jimeng API returns a JSON error envelope with a non-zero business code and message.","commonSituations":"See trigger scenarios.","solutions":["Look up the returned code/msg in the Jimeng API documentation and correct the offending parameter.","Common causes are invalid credentials, exhausted quota, or an unsupported parameter combination — fix the request and retry."],"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-15T17:31:12.345Z"}