diff --git a/lib/folio_client.rb b/lib/folio_client.rb index 7e915cb09..a9e65ad20 100644 --- a/lib/folio_client.rb +++ b/lib/folio_client.rb @@ -9,7 +9,7 @@ class FolioClient attr_reader :base_url - def initialize(url: ENV.fetch('OKAPI_URL'), username: ENV.fetch('OKAPI_USER', nil), password: ENV.fetch('OKAPI_PASSWORD', nil), tenant: 'sul') + def initialize(url: ENV.fetch('OKAPI_URL', ''), username: ENV.fetch('OKAPI_USER', nil), password: ENV.fetch('OKAPI_PASSWORD', nil), tenant: 'sul') uri = URI.parse(url) @base_url = url diff --git a/lib/traject/config/folio_config.rb b/lib/traject/config/folio_config.rb index cd137736a..64e3b0047 100644 --- a/lib/traject/config/folio_config.rb +++ b/lib/traject/config/folio_config.rb @@ -21,7 +21,7 @@ require './lib/traject/readers/folio_json_reader' else provide 'reader_class_name', 'Traject::FolioReader' - provide 'folio.client', FolioClient.new(url: self['okapi.url'] || ENV.fetch('OKAPI_URL', nil)) + provide 'folio.client', FolioClient.new(url: self['okapi.url'] || ENV.fetch('OKAPI_URL', '')) end provide 'skip_empty_item_display', -1 diff --git a/lib/traject/readers/kafka_folio_reader.rb b/lib/traject/readers/kafka_folio_reader.rb index 59017eafb..ab6b324c9 100644 --- a/lib/traject/readers/kafka_folio_reader.rb +++ b/lib/traject/readers/kafka_folio_reader.rb @@ -10,7 +10,7 @@ class Traject::KafkaFolioReader def initialize(_input_stream, settings) @settings = Traject::Indexer::Settings.new settings - @client = settings['folio.client'] || FolioClient.new + @client = settings['folio.client'] end def each