Merge pull request #30583 from overleaf/ar/increase-v1-timeout

[web] increase timeout for v1 requests to 60 seconds

GitOrigin-RevId: 0deb5e5d5fbe6b63d12263f223d76e6aa83b20a5
This commit is contained in:
Andrew Rumble
2026-01-12 09:14:55 +00:00
committed by Copybot
parent 3261ffa4d0
commit b35ff1f33e

View File

@@ -140,6 +140,7 @@ function getLicencesForAnalytics(lag, queryDate, callback) {
path: `/api/v2/institutions/institutions_licences`,
body: { query_date: queryDate, lag },
defaultErrorMessage: 'Could not get institutions licences',
timeout: 60_000,
},
callback
)
@@ -349,13 +350,14 @@ function makeAffiliationRequest(options, callback) {
if (!options.extraSuccessStatusCodes) {
options.extraSuccessStatusCodes = []
}
const timeout = options.timeout ? options.timeout : settings.apis.v1.timeout
const requestOptions = {
method: options.method,
url: `${settings.apis.v1.url}${options.path}`,
body: options.body,
auth: { user: settings.apis.v1.user, pass: settings.apis.v1.pass },
json: true,
timeout: settings.apis.v1.timeout,
timeout,
}
if (options.method === 'GET') {
requestOptions.maxAttempts = 3