chore: improve error message

This commit is contained in:
tdurieux
2021-09-09 12:11:12 +02:00
parent 17f7fdee7f
commit 5932ca6cf8

View File

@@ -57,7 +57,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
try {
response = await this._getZipUrl(config.GITHUB_TOKEN);
} catch (error) {
await this.repository.resetSate("error");
await this.repository.resetSate("error", "repo_not_accessible");
throw new AnonymousError("repo_not_accessible", {
httpStatus: 404,
cause: error,
@@ -65,7 +65,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
});
}
} else {
await this.repository.resetSate("error");
await this.repository.resetSate("error", "repo_not_accessible");
throw new AnonymousError("repo_not_accessible", {
httpStatus: 404,
object: this.repository,