ly0303521

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

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