/** * Error Action * * @return void */ protected function errorAction() { // we like to have a 400 status $this->response->setStatus(400); if ($this->mediaType === 'application/json') { $this->addErrorFlashMessage(); } else { parent::errorAction(); } }