{"record":{"id":"c5e37c977dfafa06","repo":"remotion-dev/remotion","slug":"response-message","errorCode":null,"errorMessage":"$response['message']","messagePattern":"\\$response\\['message'\\]","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"packages/lambda-php/src/PHPClient.php","lineNumber":325,"sourceCode":"        }\n\n        return $result['Payload']->getContents();\n    }\n\n    private function handleLambdaResponseRender(string $response): RenderMediaOnLambdaResponse\n    {\n        $response = json_decode($response, true);\n\n        // AWS response\n        if (isset($response->errorMessage)) {\n            throw new Exception($response->errorMessage);\n        }\n\n        $classResponse = new RenderMediaOnLambdaResponse();\n\n        // Remotion response\n        if ($response['type'] === 'error') {\n            throw new Exception($response['message']);\n        }\n\n        $classResponse->type = $response['type'];\n        $classResponse->renderId = $response['renderId'];\n        $classResponse->bucketName = $response['bucketName'];\n\n        return $classResponse;\n    }\n\n    private function handleLambdaResponseProgress(string $response): GetRenderProgressResponse\n    {\n        $response = json_decode($response, true);\n\n        if (isset($response->errorMessage)) {\n            throw new Exception($response->errorMessage);\n        }\n\n        $classResponse = new GetRenderProgressResponse();","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda-php/src/PHPClient.php#L307-L343","documentation":"Thrown by handleLambdaResponseRender when the decoded response has type === 'error', indicating the Remotion Lambda function returned a typed application error rather than a crashed-process envelope. The thrown message is whatever the function put in response['message']. This is the intended error path for render-side failures (bad input, missing assets, codec errors).","triggerScenarios":"The deployed function completes its handler but writes `{\"type\":\"error\",\"message\":\"...\"}` — e.g. composition not found in the serve bundle, an input prop failed validation, an asset could not be fetched, or a codec/encode error occurred.","commonSituations":"Composition id does not exist in the deployed serve URL. Input props violate a runtime invariant. A remote asset (image/font/audio) referenced by the composition returned 404 or timed out. ffmpeg/codec failure on the rendered media.","solutions":["Read response['message'] — it is function-authored and usually specific (e.g. 'Composition NotFound').","Confirm the composition id exists in the serve bundle (`npx remotion compositions`).","Verify all referenced assets resolve (URLs return 200, fonts are bundled).","Re-run with a single, minimal input prop to isolate whether the error is data-driven."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    $resp = $client->renderMediaOnLambda(/* ... */);\n} catch (Exception $e) {\n    // $e->getMessage() is the function-authored message; usually specific.\n    // Reproduce locally with the same serve URL + composition to isolate.\n    throw $e;\n}","preventionTips":["Confirm the composition id exists in the serve bundle before rendering.","Verify every referenced asset (image/font/audio) is reachable.","Reproduce with minimal input props to isolate data-driven causes."],"tags":["lambda","render","application-error","response-handling","php","lambda-php"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}