mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-18 01:13:06 +08:00
GitHosts: Throw RepoExists exception
This commit is contained in:
@ -124,6 +124,12 @@ class GitHub implements GitHost {
|
||||
": " +
|
||||
response.body);
|
||||
|
||||
if (response.statusCode == 422) {
|
||||
if (response.body.contains("name already exists")) {
|
||||
throw GitHostException.RepoExists;
|
||||
}
|
||||
}
|
||||
|
||||
throw GitHostException.CreateRepoFailed;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user