protected function getStatusCode(Exception $exception) { return $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500; }