mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-23 01:29:40 +02:00
improve error message
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user