{"record":{"id":"d8e3a3f4445cae78","repo":"remotion-dev/remotion","slug":"remotion-rendering-error-decoded-result-message","errorCode":null,"errorMessage":"Remotion rendering error: {decoded_result['message']}","messagePattern":"Remotion rendering error: (.+?)","errorType":"exception","errorClass":"RemotionRenderingOutputError","httpStatus":null,"severity":"error","filePath":"packages/lambda-python/remotion_lambda/remotionclient.py","lineNumber":505,"sourceCode":"            raise RemotionInvalidArgumentException(\n                f\"Invalid Lambda invocation parameters: {e}\"\n            ) from e\n        except json.JSONDecodeError as e:\n            raise RemotionException(\n                f\"Failed to decode final Lambda response: {e}. Raw response: {result_raw}\"\n            ) from e\n        except UnicodeDecodeError as e:\n            raise RemotionException(\n                f\"Failed to decode Lambda response payload: {e}\"\n            ) from e\n\n        if 'errorMessage' in decoded_result:\n            raise RemotionRenderingOutputError(\n                f\"Lambda function returned an error: {decoded_result['errorMessage']}\"\n            )\n\n        if 'type' in decoded_result and decoded_result['type'] == 'error':\n            raise RemotionRenderingOutputError(\n                f\"Remotion rendering error: {decoded_result['message']}\"\n            )\n        if 'type' not in decoded_result or decoded_result['type'] != 'success':\n            raise RemotionRenderingOutputError(\n                f\"Unexpected Lambda response format: {result_raw}\"\n            )\n\n        return decoded_result\n\n    def _custom_serializer(self, obj: Any) -> Any: # Added type hints\n        \"\"\"A custom JSON serializer that handles enums and objects.\"\"\"\n        if isinstance(obj, Enum):\n            return obj.value if hasattr(obj, 'value') else obj.name\n        # Check if it's a dataclass instance before calling asdict\n        # This often works better with mypy than just a try-except.\n        if hasattr(obj, '__dataclass_fields__'):\n            return asdict(obj)\n        if hasattr(obj, '__dict__'):","sourceCodeStart":487,"sourceCodeEnd":523,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda-python/remotion_lambda/remotionclient.py#L487-L523","documentation":"Raised when the parsed Lambda response dict has type === 'error'. Unlike errorMessage (a runtime crash), this is a structured Remotion error: the function ran successfully but the render itself failed in a controlled way and Remotion reported it via the typed protocol.","triggerScenarios":"Render produced a controlled failure: invalid composition id, missing input props, asset fetch failures, frame rendering exceptions captured by Remotion's own error handling. The 'message' field carries Remotion's human-readable description.","commonSituations":"Wrong composition id passed; referenced an asset URL that returns 404; input props schema mismatch in the composition code; private/unreachable media URL; corrupted bundle structure.","solutions":["Read the 'message' value from the error - it is Remotion's specific description of the rendering failure.","Reproduce the render locally (`remotion render`) to get a clearer stack trace with the same input props.","Verify the composition id exists in the deployed bundle (`remotion compositions`).","Confirm all asset URLs in input props are publicly accessible and return 200."],"exampleFix":"// before\nclient.render_media('non-existent-comp', input_props={...})\n\n# after\n# first run `remotion compositions` against the deployed serve URL\nclient.render_media('Main', input_props={...})","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\\n    result = client.render_media(...)\\nexcept RemotionRenderingOutputError as e:\\n    msg = str(e)  # contains Remotion's 'message'\\n    log.error('Render failed: %s', msg)\\n    raise","preventionTips":["Verify the composition id exists with `remotion compositions` against the serve URL.","Reproduce the render locally with the same input props to get a clearer stack trace.","Ensure all asset URLs are publicly reachable (HTTP 200)."],"tags":["python","lambda","rendering-error","remotion","composition"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}