Skip to content

Commit

Permalink
Add indifferent access to hash response
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Dobat committed Apr 27, 2016
1 parent a609a39 commit 1900a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/polr/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.api_key
end

def self.process
JSON.parse yield
JSON.parse(yield).with_indifferent_access
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH => e # API unreachable
raise Polr::Error.new 'Polr API is unreachable'
rescue RestClient::Exception => e # HTTP status error
Expand Down

0 comments on commit 1900a21

Please sign in to comment.