Skip to content

Commit

Permalink
rubocop Style/CaseLikeIf enabled as bug was fixed (#4169)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndushay committed Aug 4, 2022
1 parent 3e04629 commit 2f6af1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions app/models/symphony_reader.rb
Expand Up @@ -70,16 +70,16 @@ def fetch_marc_response
def symphony_response(url)
resp = client.get(url)

if resp.status == 200
case resp.status
when 200
validate_response(resp)
return resp
elsif resp.status == 404
raise NotFound, "Record not found in Symphony. Catkey: #{catkey}. API call: #{url}"
resp
when 404
raise NotFound, "Record not found in Symphony. Catkey: #{catkey}. API call: #{url}" if resp.status == 404
else
errmsg = "Got HTTP Status-Code #{resp.status} calling #{url}: #{resp.body}"
raise ResponseError, errmsg
end

raise ResponseError, errmsg
rescue Faraday::TimeoutError => e
errmsg = "Timeout for Symphony response for API call #{url}: #{e}"
Honeybadger.notify(errmsg)
Expand Down

0 comments on commit 2f6af1b

Please sign in to comment.