Throw exception from createRepo
This commit is contained in:
parent
11068696c9
commit
d19769415f
1 changed files with 4 additions and 0 deletions
|
@ -672,6 +672,10 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories')
|
|||
|
||||
$repository = $github->createRepository($owner, $name, $private);
|
||||
}
|
||||
|
||||
if (isset($repository['message'])) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Provider Error: ' . $repository['message']);
|
||||
}
|
||||
|
||||
if (isset($repository['errors'])) {
|
||||
$message = $repository['message'] ?? 'Unknown error.';
|
||||
|
|
Loading…
Reference in a new issue