handle newly-encountered DELAYED error

This commit is contained in:
Avraham Sakal
2024-07-01 08:31:40 -04:00
parent 71f72eb474
commit c6e5c76952
+2
View File
@@ -138,6 +138,8 @@ export async function* makeGetOptionContractAggregatesIterator({
})) || []; })) || [];
} else if (latestBatchResponse.status === "NOT_AUTHORIZED") { } else if (latestBatchResponse.status === "NOT_AUTHORIZED") {
console.error("Skipping due to:", latestBatchResponse); console.error("Skipping due to:", latestBatchResponse);
} else if (latestBatchResponse.status === "DELAYED") {
console.error("Skipping due to:", latestBatchResponse);
} else { } else {
console.error(latestBatchResponse); console.error(latestBatchResponse);
throw new Error(`error fetching option contract aggregate ${url}`); throw new Error(`error fetching option contract aggregate ${url}`);