@@ -97,14 +97,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
9797 logger . error ( `Failed to fetch projects for group ${ group } .` , e ) ;
9898
9999 const status = e ?. cause ?. response ?. status ;
100- if ( status === 404 ) {
101- const warning = `Group ${ group } not found or no access` ;
102- logger . warn ( warning ) ;
100+ if ( status !== undefined ) {
101+ const warning = `GitLab API returned ${ status } `
102+ logger . warning ( warning ) ;
103103 return {
104104 type : 'warning' as const ,
105105 warning
106- } ;
106+ }
107107 }
108+
109+ logger . error ( "No API response status returned" ) ;
108110 throw e ;
109111 }
110112 } ) ) ;
@@ -135,14 +137,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
135137 logger . error ( `Failed to fetch projects for user ${ user } .` , e ) ;
136138
137139 const status = e ?. cause ?. response ?. status ;
138- if ( status === 404 ) {
139- const warning = `User ${ user } not found or no access` ;
140- logger . warn ( warning ) ;
140+ if ( status !== undefined ) {
141+ const warning = `GitLab API returned ${ status } `
142+ logger . warning ( warning ) ;
141143 return {
142144 type : 'warning' as const ,
143145 warning
144- } ;
146+ }
145147 }
148+
149+ logger . error ( "No API response status returned" ) ;
146150 throw e ;
147151 }
148152 } ) ) ;
@@ -171,15 +175,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
171175 logger . error ( `Failed to fetch project ${ project } .` , e ) ;
172176
173177 const status = e ?. cause ?. response ?. status ;
174-
175- if ( status === 404 ) {
176- const warning = `Project ${ project } not found or no access` ;
177- logger . warn ( warning ) ;
178+ if ( status !== undefined ) {
179+ const warning = `GitLab API returned ${ status } `
180+ logger . warning ( warning ) ;
178181 return {
179182 type : 'warning' as const ,
180183 warning
181- } ;
184+ }
182185 }
186+
187+ logger . error ( "No API response status returned" ) ;
183188 throw e ;
184189 }
185190 } ) ) ;
0 commit comments