Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
fix/ replace method concat with +
Browse files Browse the repository at this point in the history
to prevent "can't modify frozen Array" error in `tax_svc#request` block
since `concat` method will try to modify original array
  • Loading branch information
Alexey Suslyakov committed Mar 21, 2018
1 parent d943a89 commit b941691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/tax_svc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def request(uri, request_hash)
end

JSON.parse(res)
rescue *ERRORS_TO_RETRY.concat([RestClient::ExceptionWithResponse,
RestClient::ServerBrokeConnection,
RestClient::SSLCertificateNotVerified]) => e
rescue *(ERRORS_TO_RETRY + [RestClient::ExceptionWithResponse,
RestClient::ServerBrokeConnection,
RestClient::SSLCertificateNotVerified]) => e
retry unless (tries -= 1).zero?
logger.error e, 'Avalara Request Error'
end
Expand Down

0 comments on commit b941691

Please sign in to comment.