diff --git a/src/VCS/Adapter/Git/GitHub.php b/src/VCS/Adapter/Git/GitHub.php index 721ee983..1f2da01a 100644 --- a/src/VCS/Adapter/Git/GitHub.php +++ b/src/VCS/Adapter/Git/GitHub.php @@ -6,6 +6,7 @@ use Exception; use Utopia\Cache\Cache; use Utopia\VCS\Adapter\Git; +use Utopia\VCS\Exception\RepositoryNotFound; class GitHub extends Git { @@ -143,7 +144,7 @@ public function getRepositoryName(string $repositoryId): string $response = $this->call(self::METHOD_GET, $url, ['Authorization' => "Bearer $this->accessToken"]); if (!isset($response['body']['name'])) { - throw new Exception("Repository name not found"); + throw new RepositoryNotFound("Repository not found"); } return $response['body']['name']; diff --git a/src/VCS/Exception/RepositoryNotFound.php b/src/VCS/Exception/RepositoryNotFound.php new file mode 100644 index 00000000..5f5cc145 --- /dev/null +++ b/src/VCS/Exception/RepositoryNotFound.php @@ -0,0 +1,7 @@ +