1
0
Fork 0
mirror of synced 2024-10-02 18:26:49 +13:00

Throw exception from createRepo

This commit is contained in:
Khushboo Verma 2023-08-07 21:09:51 +05:30
parent 11068696c9
commit d19769415f

View file

@ -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.';