MoveNodeForm: Respond with a status of 400 in case of a ModificationError

This commit is contained in:
Johannes Meyer 2019-01-25 07:44:35 +01:00
parent 987f576d76
commit ccdadf68f2

View file

@ -154,7 +154,9 @@ class MoveNodeForm extends QuickForm
$this->parentNode !== null ? $this->parentNode->getName() : null
);
} catch (ModificationError $e) {
$this->notifyError($e->getMessage())
$this->notifyError($e->getMessage());
Icinga::app()->getResponse()
->setHttpResponseCode(400)
->redirectAndExit($this->getSuccessUrl());
}