get(IslandoraSettingsForm::CONFIG_NAME); $geminiUrl = $settings->get(IslandoraSettingsForm::GEMINI_URL); // Only attempt if there is one. if (!empty($geminiUrl)) { return GeminiClient::create($geminiUrl, $logger); } else { $logger->notice("Attempted to create Gemini client without a Gemini URL defined."); throw new PreconditionFailedHttpException("Unable to instantiate GeminiClient, missing Gemini URI in Islandora setting."); } } }