fix: handle empty repo

This commit is contained in:
tdurieux
2022-10-04 09:47:56 +02:00
parent a386643009
commit 388116cf41

View File

@@ -92,6 +92,9 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
recursive: "1",
});
} catch (error) {
if (error.status == 409 && error.message == "Git Repository is empty.") {
return {};
}
await this.repository.resetSate("error", "repo_not_accessible");
throw new AnonymousError("repo_not_accessible", {
httpStatus: error.status,