fix(api): bitbucket implicit auth login delay (#4243)
This commit is contained in:
parent
7affaf54c5
commit
a80ab123dc
@ -69,7 +69,9 @@ export const requestWithBackoff = async (
|
||||
}
|
||||
return response;
|
||||
} catch (err) {
|
||||
if (attempt <= 5) {
|
||||
if (attempt > 5 || err.message === "Can't refresh access token when using implicit auth") {
|
||||
throw err;
|
||||
} else {
|
||||
if (!api.rateLimiter) {
|
||||
const timeout = err.resetSeconds || attempt * attempt;
|
||||
console.log(
|
||||
@ -87,8 +89,6 @@ export const requestWithBackoff = async (
|
||||
}, 1000 * timeout);
|
||||
}
|
||||
return requestWithBackoff(api, req, attempt + 1);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user