From bd772087c488a0af01bbd4b528368d913963577c Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Wed, 27 May 2026 18:46:38 -0600 Subject: [PATCH] Increase CARD API timeout from 15s to 30s The /api/v1/teams endpoint returns 193 teams with nested objects and can take longer than 15s to respond under load. Token acquisition succeeds within 500ms but subsequent data calls were hitting the 15s timeout. --- backend/helpers/cardApi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/helpers/cardApi.js b/backend/helpers/cardApi.js index 062b45b..8d0aa21 100644 --- a/backend/helpers/cardApi.js +++ b/backend/helpers/cardApi.js @@ -63,7 +63,7 @@ function acquireToken(timeout) { 'authorization': 'Basic ' + authString, 'content-length': '0', }, - timeout: timeout || 15000, + timeout: timeout || 30000, }; if (isHttps) { @@ -124,7 +124,7 @@ async function ensureToken(timeout) { // Generic request — supports GET and POST with Bearer auth + 401 retry // --------------------------------------------------------------------------- async function cardRequest(method, urlPath, body, options) { - const timeout = (options && options.timeout) || 15000; + const timeout = (options && options.timeout) || 30000; const skipAuth = (options && options.skipAuth) || false; async function doRequest(bearerToken) {