Skip to content

🎥 Make videos programmatically with React

fix error message when getting a timeout

Jonny Burger659db1067a2c
diff --git a/packages/lambda/src/functions/helpers/make-timeout-error.ts b/packages/lambda/src/functions/helpers/make-timeout-error.ts
index f41519d343..d4fd653be1 100644
--- a/packages/lambda/src/functions/helpers/make-timeout-error.ts
+++ b/packages/lambda/src/functions/helpers/make-timeout-error.ts
@@ -22,6 +22,8 @@ export const makeTimeoutError = ({
renderId,
});
+ const error = new Error(message);
+
return {
attempt: 1,
chunk: null,
@@ -29,7 +31,7 @@ export const makeTimeoutError = ({
frame: null,
isFatal: true,
s3Location: '',
- stack: new Error().stack as string,
+ stack: error.stack as string,
tmpDir: null,
totalAttempts: 1,
type: 'stitcher',