From 8deeeff2223321e9c6bdd5499a4ebd15496d26ab Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Fri, 9 Feb 2018 16:28:43 -0500 Subject: [PATCH 1/2] just bubble the exception --- tap_salesforce/salesforce/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_salesforce/salesforce/__init__.py b/tap_salesforce/salesforce/__init__.py index 797aedf1..93fa7627 100644 --- a/tap_salesforce/salesforce/__init__.py +++ b/tap_salesforce/salesforce/__init__.py @@ -275,7 +275,7 @@ def _make_request(self, http_method, url, headers=None, body=None, stream=False, try: resp.raise_for_status() except RequestException as ex: - raise TapSalesforceHTTPException("Error response from Salesforce") from ex + raise ex if resp.headers.get('Sforce-Limit-Info') is not None: self.rest_requests_attempted += 1 From 79bcf7ba2fc2f9434d58e3470cb62656eeba1f2a Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Fri, 9 Feb 2018 16:32:37 -0500 Subject: [PATCH 2/2] remove TapSalesforceHTTPException --- tap_salesforce/salesforce/__init__.py | 3 +-- tap_salesforce/salesforce/exceptions.py | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tap_salesforce/salesforce/__init__.py b/tap_salesforce/salesforce/__init__.py index 93fa7627..475757b7 100644 --- a/tap_salesforce/salesforce/__init__.py +++ b/tap_salesforce/salesforce/__init__.py @@ -13,8 +13,7 @@ from tap_salesforce.salesforce.rest import Rest from tap_salesforce.salesforce.exceptions import ( TapSalesforceException, - TapSalesforceQuotaExceededException, - TapSalesforceHTTPException) + TapSalesforceQuotaExceededException) LOGGER = singer.get_logger() diff --git a/tap_salesforce/salesforce/exceptions.py b/tap_salesforce/salesforce/exceptions.py index d6f003e3..ff18c014 100644 --- a/tap_salesforce/salesforce/exceptions.py +++ b/tap_salesforce/salesforce/exceptions.py @@ -6,7 +6,3 @@ class TapSalesforceException(Exception): class TapSalesforceQuotaExceededException(TapSalesforceException): pass - - -class TapSalesforceHTTPException(TapSalesforceException): - pass