File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,8 +206,8 @@ export class AccountPermissionSyncer {
206206 } ,
207207 } ,
208208 } ) ;
209- throw error ;
210209 }
210+ throw error ;
211211 }
212212 }
213213
@@ -254,21 +254,7 @@ export class AccountPermissionSyncer {
254254 // @note : we only care about the private repos since we don't need to build a mapping
255255 // for public repos.
256256 // @see : packages/web/src/prisma.ts
257- let githubRepos ;
258- try {
259- githubRepos = await getReposForAuthenticatedUser ( /* visibility = */ 'private' , octokit ) ;
260- } catch ( error ) {
261- if ( error && typeof error === 'object' && 'status' in error ) {
262- const status = ( error as { status : number } ) . status ;
263- if ( status === 401 || status === 403 ) {
264- throw new Error (
265- `GitHub API returned ${ status } error. Your token may have expired or lacks the required permissions. ` +
266- `Please re-authorize with GitHub to grant the necessary access.`
267- ) ;
268- }
269- }
270- throw error ;
271- }
257+ const githubRepos = await getReposForAuthenticatedUser ( /* visibility = */ 'private' , octokit ) ;
272258 const gitHubRepoIds = githubRepos . map ( repo => repo . id . toString ( ) ) ;
273259
274260 const repos = await this . db . repo . findMany ( {
You can’t perform that action at this time.
0 commit comments