public function renderException($exception)
{
if ($exception instanceof NotFoundHttpException || !$this->transferException) {
return parent::renderException($exception);
}
$this->apiServerSendData($this->getExceptionArray($exception));
return parent::renderException($exception);
}