/**
* Execute a dispatched request
* @throws Route\NoMatchException|\Exception
*/
protected function execute()
{
if (($route = $this->determineRoute()) instanceof RouteMetaData) {
// Set the matched service object and the error handler into the service class
$this->service->setMatchedRoute($route);
// Get the representation to be used - always successful or it throws an exception
$this->service->setRepresentation($this->representationManager->handleExposureSettingsFromHttpMethod($this->getRequest(), $route, $this->emr));
$this->service->setErrorHandler($this->getErrorHandler());
// Set up the service for a new request
$this->service->setUpAndRunRequest();
}
}