diff --git a/.rubocop.yml b/.rubocop.yml index e37c12369d..b039816fd1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -176,7 +176,7 @@ Style/BisectedAttrAccessor: Enabled: true Style/CaseLikeIf: - Enabled: false # Here be dragons https://github.com/rubocop-hq/rubocop/issues/8508 + Enabled: true Style/ExplicitBlockArgument: Enabled: true diff --git a/app/models/symphony_reader.rb b/app/models/symphony_reader.rb index 9bfb83fa56..65ef1adc53 100644 --- a/app/models/symphony_reader.rb +++ b/app/models/symphony_reader.rb @@ -69,12 +69,11 @@ def fetch_marc_response def symphony_response(url) resp = client.get(url) + raise NotFound, "Record not found in Symphony. Catkey: #{catkey}. API call: #{url}" if resp.status == 404 if resp.status == 200 validate_response(resp) return resp - elsif resp.status == 404 - raise NotFound, "Record not found in Symphony. Catkey: #{catkey}. API call: #{url}" else errmsg = "Got HTTP Status-Code #{resp.status} calling #{url}: #{resp.body}" end