badges / badges/shields

Error: Token pool is exhausted

Open
#7,445 10 comments 0 reactions 0 assignees View on GitHub
bug service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

Sentry Issue: [SHIELDS-77](https://sentry.io/organizations/shields/issues/2837466428/?referrer=github_integration)

```
Error: Token pool is exhausted
File "/app/core/token-pooling/token-pool.js", line 268, in TokenPool._nextBatch
throw Error('Token pool is exhausted')
File "/app/core/token-pooling/token-pool.js", line 305, in TokenPool.next
token = this._nextBatch()
File "/app/services/librariesio/librariesio-api-provider.js", line 75, in LibrariesIoApiProvider.fetch
token = this.standardTokens.next()
File "/app/core/base-service/base.js", line 233, in LibrariesIoRepoDependencies._request
const { res, buffer } = await this._requestFetcher(url, options)
File "/app/core/base-service/base-json.js", line 45, in LibrariesIoRepoDependencies._requestJson
const { buffer } = await this._request({
...
(5 additional frame(s) were not displayed)
```

Contributor guide

Open the contributing guide

Research direction

Read core/token-pooling/token-pool.js at TokenPool._nextBatch and next, then follow services/librariesio/librariesio-api-provider.js:75 into the request path in core/base-service/base.js and base-json.js. Reproduce or inspect the exhaustion path and verify that Libraries.io requests no longer raise this error with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.