ly0303521

防止服务端还未反应,轮询过早,反馈404报错

@@ -113,6 +113,11 @@ export const pollVideoStatus = ( @@ -113,6 +113,11 @@ export const pollVideoStatus = (
113 console.warn(`Gateway timeout (${res.status}), retrying poll...`); 113 console.warn(`Gateway timeout (${res.status}), retrying poll...`);
114 return; 114 return;
115 } 115 }
  116 + // Do not fail immediately on 404, the task might not be ready yet
  117 + if (res.status === 404) {
  118 + console.warn('Task not found (404), retrying poll...');
  119 + return;
  120 + }
116 clearInterval(interval); 121 clearInterval(interval);
117 reject(new Error(`HTTP error! status: ${res.status}`)); 122 reject(new Error(`HTTP error! status: ${res.status}`));
118 return; 123 return;