Client icon indicating copy to clipboard operation
Client copied to clipboard

[11.15] Repository branch and file check existence methods

Open misantron opened this issue 2 years ago • 2 comments

misantron avatar Oct 31 '23 13:10 misantron

Hello, take a look please

misantron avatar Nov 13 '23 10:11 misantron

try {
   $this->head($uri, []);
            
   return true;
} catch (Gitlab\Exception\RuntimeException $ex) {
   if (404 === $ex->getCode()) {
      return false;
   }
   throw $ex;
}

@GrahamCampbell can I use such a code to handle exception and check entity existence?

misantron avatar Dec 04 '23 07:12 misantron