mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-23 17:49:40 +02:00
chore: improve error message
This commit is contained in:
@@ -57,7 +57,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
|
|||||||
try {
|
try {
|
||||||
response = await this._getZipUrl(config.GITHUB_TOKEN);
|
response = await this._getZipUrl(config.GITHUB_TOKEN);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await this.repository.resetSate("error");
|
await this.repository.resetSate("error", "repo_not_accessible");
|
||||||
throw new AnonymousError("repo_not_accessible", {
|
throw new AnonymousError("repo_not_accessible", {
|
||||||
httpStatus: 404,
|
httpStatus: 404,
|
||||||
cause: error,
|
cause: error,
|
||||||
@@ -65,7 +65,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await this.repository.resetSate("error");
|
await this.repository.resetSate("error", "repo_not_accessible");
|
||||||
throw new AnonymousError("repo_not_accessible", {
|
throw new AnonymousError("repo_not_accessible", {
|
||||||
httpStatus: 404,
|
httpStatus: 404,
|
||||||
object: this.repository,
|
object: this.repository,
|
||||||
|
|||||||
Reference in New Issue
Block a user