remotion-dev/remotion · error · Exception
$response['message']
Error message
$response['message']
What it means
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).
Source
Thrown at packages/lambda-php/src/PHPClient.php:325
}
return $result['Payload']->getContents();
}
private function handleLambdaResponseRender(string $response): RenderMediaOnLambdaResponse
{
$response = json_decode($response, true);
// AWS response
if (isset($response->errorMessage)) {
throw new Exception($response->errorMessage);
}
$classResponse = new RenderMediaOnLambdaResponse();
// Remotion response
if ($response['type'] === 'error') {
throw new Exception($response['message']);
}
$classResponse->type = $response['type'];
$classResponse->renderId = $response['renderId'];
$classResponse->bucketName = $response['bucketName'];
return $classResponse;
}
private function handleLambdaResponseProgress(string $response): GetRenderProgressResponse
{
$response = json_decode($response, true);
if (isset($response->errorMessage)) {
throw new Exception($response->errorMessage);
}
$classResponse = new GetRenderProgressResponse();View on GitHub (pinned to 78fe4bb3fd)
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.
Defensive patterns
Strategy: try-catch
Try / catch
try {
$resp = $client->renderMediaOnLambda(/* ... */);
} catch (Exception $e) {
// $e->getMessage() is the function-authored message; usually specific.
// Reproduce locally with the same serve URL + composition to isolate.
throw $e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- $response->errorMessage
- Failed to invoke Lambda function
- Render did not finish yet
- Comma-separated frame selections are only supported by the l
- Multiple frame ranges are not supported on Lambda. Use rende
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/c5e37c977dfafa06.
Report an issue: GitHub.