From 5932ca6cf87fccebec4c6a829f5973b4bcbf60b9 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Thu, 9 Sep 2021 12:11:12 +0200 Subject: [PATCH] chore: improve error message --- src/source/GitHubDownload.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/source/GitHubDownload.ts b/src/source/GitHubDownload.ts index b46d95f..4e458f4 100644 --- a/src/source/GitHubDownload.ts +++ b/src/source/GitHubDownload.ts @@ -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,