lib/tracker_api/client.rb in tracker_api-1.9.1 vs lib/tracker_api/client.rb in tracker_api-1.10.0

- old
+ new

@@ -221,10 +221,10 @@ req.headers.merge!(headers) req.params.merge!(params) req.body = body end response - rescue Faraday::Error::ClientError => e + rescue Faraday::ClientError, Faraday::ServerError => e status_code = e.response[:status] case status_code when 400..499 then raise TrackerApi::Errors::ClientError.new(e) when 500..599 then raise TrackerApi::Errors::ServerError.new(e) else raise "Expected 4xx or 5xx HTTP status code; got #{status_code} instead."