Skip to content

Commit eda8134

Browse files
committed
adding error log
1 parent 54dc5f4 commit eda8134

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/routes/githubValidationRoute.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ router.get('/gh-validation/:userId', async (req, res) => {
3434
const accountAge = daysSince(userData.created_at);
3535
valid = accountAge >= ACCOUNT_AGE_MINIMUM_DAYS;
3636

37+
if(!valid){
38+
console.error(`Github User ID ${userId} is invalid. Username: ${userData.login}`)
39+
}
3740
res.status(200).json({
3841
valid,
3942
});

0 commit comments

Comments
 (0)