diff --git a/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php index 002805ac4e..65bc5f69da 100644 --- a/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php @@ -23,6 +23,12 @@ final class DiffusionGetRecentCommitsByPathConduitAPIMethod ); } + protected function defineErrorTypes() { + return array( + 'ERR_NOT_FOUND' => pht('Repository was not found.'), + ); + } + protected function defineReturnType() { return 'nonempty list'; } @@ -36,6 +42,10 @@ final class DiffusionGetRecentCommitsByPathConduitAPIMethod 'branch' => $request->getValue('branch'), )); + if ($drequest === null) { + throw new ConduitException('ERR_NOT_FOUND'); + } + $limit = nonempty( $request->getValue('limit'), self::DEFAULT_LIMIT);