FIX: Cambios a Servicios Toku
This commit is contained in:
@ -9,6 +9,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||
use Incoviba\Common\Define\Repository;
|
||||
use Incoviba\Common\Implement\Exception\{EmptyResponse, EmptyResult};
|
||||
use Incoviba\Common\Ideal\LoggerEnabled;
|
||||
use Incoviba\Exception\InvalidResult;
|
||||
|
||||
abstract class AbstractEndPoint extends LoggerEnabled implements EndPoint
|
||||
{
|
||||
@ -147,7 +148,7 @@ abstract class AbstractEndPoint extends LoggerEnabled implements EndPoint
|
||||
* @param string $id
|
||||
* @param string $message
|
||||
* @return array
|
||||
* @throws EmptyResponse
|
||||
* @throws InvalidResult
|
||||
*/
|
||||
protected function doGetById(callable $callable, string $id, string $message): array
|
||||
{
|
||||
@ -155,7 +156,7 @@ abstract class AbstractEndPoint extends LoggerEnabled implements EndPoint
|
||||
$model = $callable($id);
|
||||
return json_decode(json_encode($model), true);
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new EmptyResponse($message, $exception);
|
||||
throw new InvalidResult($message, 404, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user