From e3484f8f79019cb22b13b961876b91e951f535fc Mon Sep 17 00:00:00 2001 From: Isaac Lewis Date: Wed, 28 Mar 2018 18:11:38 -0700 Subject: [PATCH] remove dup check --- lib/syspro/syspro_client.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/syspro/syspro_client.rb b/lib/syspro/syspro_client.rb index 5f0510b..37ba55e 100644 --- a/lib/syspro/syspro_client.rb +++ b/lib/syspro/syspro_client.rb @@ -155,23 +155,17 @@ module Syspro request_start = Time.now log_request(context, num_retries) resp = yield - context = context.dup_from_response(resp) log_response(context, request_start, resp.status, resp.body) # We rescue all exceptions from a request so that we have an easy spot to # implement our retry logic across the board. We'll re-raise if it's a type # of exception that we didn't expect to handle. rescue StandardError => e - # If we modify context we copy it into a new variable so as not to - # taint the original on a retry. - error_context = context - if e.respond_to?(:response) && e.response - error_context = context.dup_from_response(e.response) - log_response(error_context, request_start, + log_response(context, request_start, e.response[:status], e.response[:body]) else - log_response_error(error_context, request_start, e) + log_response_error(context, request_start, e) end if self.class.should_retry?(e, num_retries) -- libgit2 0.21.4