src/CoreHandler.php
private function mapException(ControllerException $exception): ClientException
    {
        switch ($exception->getCode()) {
            case ControllerException::BAD_ACTION:
                //no break
            case ControllerException::NOT_FOUND:
                return new NotFoundException($exception->getMessage());
            case ControllerException::FORBIDDEN:
                return new ForbiddenException($exception->getMessage());
            default:
                return new BadRequestException($exception->getMessage());
        }
    }
private function mapException(ControllerException $exception): ClientException
    {
        switch ($exception->getCode()) {
            case ControllerException::BAD_ACTION:
                //no break
            case ControllerException::NOT_FOUND:
                return new NotFoundException($exception->getMessage());
            case ControllerException::FORBIDDEN:
                return new ForbiddenException($exception->getMessage());
            default:
                return new BadRequestException($exception->getMessage());
        }
    }
private function mapException ( ControllerException $ exception ) : ClientException { switch ( $ exception -> getCode ( ) ) { case ControllerException :: BAD_ACTION : //no break case ControllerException :: NOT_FOUND : return new NotFoundException ( $ exception -> getMessage ( ) ) ; case ControllerException :: FORBIDDEN : return new ForbiddenException ( $ exception -> getMessage ( ) ) ; default : return new BadRequestException ( $ exception -> getMessage ( ) ) ; } }
Converts core specific ControllerException into HTTP ClientException.

@param ControllerException $exception
@return ClientException
Converts core specific ControllerException into HTTP ClientException .