From 1b6d49d73ec5ae7357710d4d724e816ef7fae585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pinheiro?= Date: Sat, 6 Jul 2024 15:29:11 +0100 Subject: [PATCH] feat: add http client timeout (#248) Refs: closes #241 ## Summary Add 1 minute timeout to EcoMap HTTP client. --- web/src/lib/clients/ecomap/http.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/lib/clients/ecomap/http.ts b/web/src/lib/clients/ecomap/http.ts index 836c224d..7373a032 100644 --- a/web/src/lib/clients/ecomap/http.ts +++ b/web/src/lib/clients/ecomap/http.ts @@ -63,6 +63,7 @@ const middleware: Middleware = { const ecomapHttpClient = createClient({ baseUrl: "/api", + signal: AbortSignal.timeout(1000 * 60), // 1 minute timeout. }); ecomapHttpClient.use(middleware);