Skip to content

🎥 Make videos programmatically with React

Fix helpful Lambda error message

Jonny Burger1b33cec68222
diff --git a/packages/lambda/src/shared/call-lambda.ts b/packages/lambda/src/shared/call-lambda.ts
index 0023a11b85..88d0db6268 100644
--- a/packages/lambda/src/shared/call-lambda.ts
+++ b/packages/lambda/src/shared/call-lambda.ts
@@ -80,7 +80,7 @@ export const callLambdaWithStreaming = async <
// Do not remove this await
await callLambdaWithStreamingWithoutRetry<T, Provider>(options);
} catch (err) {
- if ((err as Error).message.includes('TooManyRequestsException')) {
+ if ((err as Error).stack?.includes('TooManyRequestsException')) {
throw new Error(
`AWS Concurrency limit reached (Original Error: ${(err as Error).message}). See https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit for tips to fix this.`,
);