protected function getHeaders(Exception $exception) { return $exception instanceof HttpExceptionInterface ? $exception->getHeaders() : []; }