improve error message

This commit is contained in:
tdurieux
2021-04-27 08:01:02 +02:00
parent b6c4b780b8
commit dc84de9d84
4 changed files with 66 additions and 30 deletions
+2
View File
@@ -102,6 +102,8 @@ module.exports.getRepoDetails = async (options) => {
if (error.status == 401 && options.token != config.GITHUB_TOKEN) {
options.token = config.GITHUB_TOKEN;
return await module.exports.getRepoDetails(options);
} else if (error.status == 403) {
throw "repo_not_accessible";
}
throw "repo_not_found";
}