diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 8477478b5f..648653b870 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -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.';