protected function renderCakeException(CakeException $error) {
		if ($this->isJsonApiRequest()) {
			return $this->renderCakeAsJsonApi($error);
		}

		if ($this->isJsonRequest()) {
			return $this->renderCakeAsJson($error);
		}

		return $this->defaultCakeRender($error);
	}