Lib/Error/SerializerExceptionRenderer.php
protected function renderSerializerException(BaseSerializerException $error) {
		if ($this->isJsonApiRequest()) {
			return $this->renderSerializerAsJsonApi($error);
		}

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

		return $this->defaultSerializerRender($error);
	}
protected function renderSerializerException(BaseSerializerException $error) {
		if ($this->isJsonApiRequest()) {
			return $this->renderSerializerAsJsonApi($error);
		}

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

		return $this->defaultSerializerRender($error);
	}
render exceptions of type BaseSerializerException

@param BaseSerializerException $error the BaseSerializerException error to render
@return void