private function getStatusCodeForException(\Exception $exception) { return $exception instanceof HttpException ? $exception->getStatusCode() : 500; }