File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ async function retryRequest(fn: () => Promise<RemoteArticleData>, retries: numbe
31
31
if ( retries === 0 || ! ( error instanceof RequestError && error . response ?. statusCode === 429 ) ) {
32
32
throw error ;
33
33
}
34
+ debug ( 'Rate limited, retrying in %s ms' , retryDelay ) ;
34
35
await delay ( retryDelay ) ;
35
36
return retryRequest ( fn , retries - 1 ) ;
36
37
}
@@ -96,7 +97,7 @@ export async function updateRemoteArticle(article: Article, devtoKey: string): P
96
97
try {
97
98
const markdown = matter . stringify ( article , article . data , { lineWidth : - 1 } as any ) ;
98
99
const { id } = article . data ;
99
- // Throttle API calls in case of article creation
100
+ // Throttle API calls in case of article creation or update
100
101
const get = id ? throttledPutForUpdate : throttledPostForCreate ;
101
102
const result = await get ( `${ apiUrl } /articles${ id ? `/${ id } ` : '' } ` , {
102
103
headers : { 'api-key' : devtoKey } ,
You can’t perform that action at this time.
0 commit comments