File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -378,9 +378,19 @@ async function handleGitLabError(
378378) : Promise < void > {
379379 if ( ! response . ok ) {
380380 const errorBody = await response . text ( ) ;
381- throw new Error (
382- `GitLab API error: ${ response . status } ${ response . statusText } \n${ errorBody } `
383- ) ;
381+ // Check specifically for Rate Limit error
382+ if ( response . status === 403 && errorBody . includes ( "User API Key Rate limit exceeded" ) ) {
383+ console . error ( "GitLab API Rate Limit Exceeded:" , errorBody ) ;
384+ console . log ( "User API Key Rate limit exceeded. Please try again later." ) ;
385+ throw new Error (
386+ `GitLab API Rate Limit Exceeded: ${ errorBody } `
387+ ) ;
388+ } else {
389+ // Handle other API errors
390+ throw new Error (
391+ `GitLab API error: ${ response . status } ${ response . statusText } \n${ errorBody } `
392+ ) ;
393+ }
384394 }
385395}
386396
You can’t perform that action at this time.
0 commit comments