@@ -166,8 +166,8 @@ app.get('/github/callback', async (request: FastifyRequest<{ Querystring: OAuthC
166166 update : { accessToken : encryptedToken , scopes : 'read:user user:email' } ,
167167 create : { userId : user . id , platform : 'github' , accessToken : encryptedToken , scopes : 'read:user user:email' } ,
168168 } ) ;
169- } catch ( err ) {
170- app . log . error ( { err , userId : user . id } , 'Failed to persist GitHub OAuth token — authentication proceeds' ) ;
169+ } catch ( error ) {
170+ app . log . error ( { error , userId : user . id } , 'Failed to persist GitHub OAuth token — authentication proceeds' ) ;
171171 }
172172
173173 // Generate JWT
@@ -192,9 +192,9 @@ app.get('/github/callback', async (request: FastifyRequest<{ Querystring: OAuthC
192192 } ) ;
193193
194194 return reply . redirect ( `${ process . env . PUBLIC_APP_URL } /dashboard` ) ;
195- } catch ( err ) {
196- const message = err instanceof Error ? err . message : String ( err ) ;
197- app . log . error ( { err , message } , 'GitHub auth error' ) ;
195+ } catch ( error ) {
196+ const message = error instanceof Error ? error . message : String ( error ) ;
197+ app . log . error ( { error , message } , 'GitHub auth error' ) ;
198198 return reply . status ( 500 ) . send ( { error : 'Authentication failed' } ) ;
199199 }
200200 } ) ;
@@ -326,9 +326,9 @@ app.get('/github/callback', async (request: FastifyRequest<{ Querystring: OAuthC
326326 } ) ;
327327
328328 return reply . redirect ( `${ process . env . PUBLIC_APP_URL } /dashboard` ) ;
329- } catch ( err ) {
330- const message = err instanceof Error ? err . message : String ( err ) ;
331- app . log . error ( { err , message } , 'Google auth error' ) ;
329+ } catch ( error ) {
330+ const message = error instanceof Error ? error . message : String ( error ) ;
331+ app . log . error ( { error , message } , 'Google auth error' ) ;
332332 return reply . status ( 500 ) . send ( { error : 'Authentication failed' } ) ;
333333 }
334334 } ) ;
0 commit comments