Commit e435dbc 1 parent 8ac4717 commit e435dbc Copy full SHA for e435dbc
File tree 1 file changed +5
-1
lines changed
dev-packages/ovsx-client/src
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,18 @@ export class OVSXHttpClient implements OVSXClient {
48
48
49
49
protected async requestJson < R > ( url : string ) : Promise < R > {
50
50
const attempts = 5 ;
51
+ let warn = true ;
51
52
for ( let i = 0 ; i < attempts ; i ++ ) {
52
53
await this . rateLimiter . removeTokens ( i + 1 ) ;
53
54
const context = await this . requestService . request ( {
54
55
url,
55
56
headers : { 'Accept' : 'application/json' }
56
57
} ) ;
57
58
if ( context . res . statusCode === 429 ) {
58
- console . warn ( 'OVSX rate limit exceeded. Will perform request with higher timeout. Consider reducing the rate limit.' ) ;
59
+ if ( warn ) {
60
+ warn = false ;
61
+ console . warn ( 'OVSX rate limit exceeded. Will perform request with higher timeout. Consider reducing the rate limit.' ) ;
62
+ }
59
63
if ( i < attempts - 1 ) {
60
64
continue ;
61
65
}
You can’t perform that action at this time.
0 commit comments