mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Throw exception from createRepo
This commit is contained in:
@@ -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.';
|
||||
|
||||
Reference in New Issue
Block a user