Skip to content

🎥 Make videos programmatically with React

Update is-flaky-error.ts

Jonny Burger684a04f446ae
diff --git a/packages/lambda/src/shared/is-flaky-error.ts b/packages/lambda/src/shared/is-flaky-error.ts
index 2c4f5e1768..e8b4df6bf5 100644
--- a/packages/lambda/src/shared/is-flaky-error.ts
+++ b/packages/lambda/src/shared/is-flaky-error.ts
@@ -1,12 +1,37 @@
export const isFlakyError = (err: Error): boolean => {
const {message} = err;
- return (
- message.includes('FATAL:zygote_communication_linux.cc') ||
- message.includes('error while loading shared libraries: libnss3.so') ||
- message.includes('but the server sent no data') ||
- message.includes('Compositor panicked') ||
- (message.includes('Compositor exited') && !message.includes('SIGSEGV')) ||
- message.includes('Timed out while setting up the headless browser')
- );
+ // storage.googleapis.com sometimes returns 500s, and Video does not have retry on its own
+ if (
+ message.includes('Format error') &&
+ message.includes('storage.googleapis.com')
+ ) {
+ return true;
+ }
+
+ if (message.includes('FATAL:zygote_communication_linux.cc')) {
+ return true;
+ }
+
+ if (message.includes('error while loading shared libraries: libnss3.so')) {
+ return true;
+ }
+
+ if (message.includes('but the server sent no data')) {
+ return true;
+ }
+
+ if (message.includes('Compositor panicked')) {
+ return true;
+ }
+
+ if (message.includes('Compositor exited') && !message.includes('SIGSEGV')) {
+ return true;
+ }
+
+ if (message.includes('Timed out while setting up the headless browser')) {
+ return true;
+ }
+
+ return false;
};