protected function internalServerError()
{
$response = new Response(['data' => $this->lastError ?: new HttpException(500, 'There was an internal server error')]);
$this->formatException($response->data, $response);
$response->prepare();
return $response;
}