Skip to content

Commit 421c736

Browse files
committed
added a method to find where github_id is not valid
1 parent 8e9414e commit 421c736

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controllers/users.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,12 @@ const migrate = async (req, res) => {
495495
batchWrite.update(userDoc.ref, { github_user_id: `${githubUserId}` });
496496
})
497497
.catch((error) => {
498-
logger.error(error);
498+
if (error.response && error.response.status === 404) {
499+
logger.error(`Error: github_user_id not found for ${githubUsername}`);
500+
} else {
501+
// Other error occurred
502+
logger.error("An error occurred at axios.get:", error);
503+
}
499504
})
500505
);
501506
}

0 commit comments

Comments
 (0)