Skip to content

Commit

Permalink
monitoring: Fix HTTP response code when showing an invalid service
Browse files Browse the repository at this point in the history
refs #6281
  • Loading branch information
lippserd committed May 21, 2015
1 parent ce9110d commit e8c704b
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -21,17 +21,17 @@ class Monitoring_ServiceController extends MonitoredObjectController

/**
* Fetch the requested service from the monitoring backend
*
* @throws Zend_Controller_Action_Exception If the service was not found
*/
public function init()
{
$service = new Service($this->backend, $this->params->get('host'), $this->params->get('service'));
$service = new Service(
$this->backend, $this->params->getRequired('host'), $this->params->getRequired('service')
);

$this->applyRestriction('monitoring/services/filter', $service);

if ($service->fetch() === false) {
throw new Zend_Controller_Action_Exception($this->translate('Service not found'));
$this->httpNotFound($this->translate('Service not found'));
}
$this->object = $service;
$this->createTabs();
Expand Down

0 comments on commit e8c704b

Please sign in to comment.