Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add client side timeout for EIC request (#5105)

Ryan Weiler2e3323d79255
diff --git a/web/js/mapUI/components/eic/eic.js b/web/js/mapUI/components/eic/eic.js
index 7eeb9e334..35bc1f3a9 100644
--- a/web/js/mapUI/components/eic/eic.js
+++ b/web/js/mapUI/components/eic/eic.js
@@ -17,7 +17,7 @@ function EIC() {
const requestBestDate = async () => {
try {
const url = `https://uhkookzof2.execute-api.us-west-2.amazonaws.com/dev/scenarios?item_type=scenario&item_id=${scenario}`;
- const response = await fetch(url);
+ const response = await fetch(url, { timeout: 10000 });
if (!response.ok) {
throw new Error('Network response was not ok.');
}