mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-03-11 22:15:35 +00:00
This commit is contained in:
parent
51ed969702
commit
fde2528df1
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.4.92",
|
||||
"version": "6.4.93",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
|
|
|
|||
|
|
@ -335,7 +335,11 @@ export default new class URQLClient extends Client {
|
|||
if (!(error instanceof FetchError)) return 0
|
||||
if (error.res.status === 500) return 1000
|
||||
|
||||
return this.setRateLimit((parseInt(error.res.headers.get('retry-after') ?? '60') + 1) * 1000)
|
||||
const delay = (parseInt(error.res.headers.get('retry-after') ?? '60') + 1) * 1000
|
||||
|
||||
debug('Setting rate limit for', error.res.status, delay)
|
||||
|
||||
return this.setRateLimit(delay)
|
||||
})
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue