Skip to content

Commit 7964104

Browse files
author
Lasim
committed
fix(backend): specify error type in catch block for GitHub auth
1 parent ae4106d commit 7964104

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

services/backend/src/routes/auth/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ export default async function githubAuthRoutes(fastify: FastifyInstance) {
391391
const frontendUrl = await GlobalSettingsInitService.getPageUrl();
392392
return reply.redirect(frontendUrl);
393393

394-
} catch (error) {
394+
} catch (error: unknown) {
395395
fastify.log.error(error, 'Error during GitHub OAuth callback:');
396396
if (error instanceof Error && error.message.includes('OAuth')) {
397397
// Specific OAuth errors (e.g., invalid code)

services/backend/src/routes/auth/verifyEmail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default async function verifyEmailRoute(server: FastifyInstance) {
161161
}
162162
}
163163
}
164-
} catch (error) {
164+
} catch (error: unknown) {
165165
// Don't fail verification if welcome email fails
166166
request.log.warn({
167167
error,

services/backend/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"compilerOptions": {
33
"target": "ES2022",
44
"module": "commonjs",
5+
"moduleResolution": "node",
56
"outDir": "dist",
67
"rootDir": "src",
78
"strict": true,
89
"skipLibCheck": true,
910
"esModuleInterop": true,
11+
"allowSyntheticDefaultImports": true,
1012
"resolveJsonModule": true,
1113
"baseUrl": ".",
1214
"paths": {

0 commit comments

Comments
 (0)