Skip to content

Commit

Permalink
Merge pull request #39 from singer-io/fix-more-raise
Browse files Browse the repository at this point in the history
Bubble the requests exception
  • Loading branch information
KAllan357 authored Feb 9, 2018
2 parents d23e14e + 79bcf7b commit c42fdc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tap_salesforce/salesforce/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -275,7 +274,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
Expand Down
4 changes: 0 additions & 4 deletions tap_salesforce/salesforce/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ class TapSalesforceException(Exception):

class TapSalesforceQuotaExceededException(TapSalesforceException):
pass


class TapSalesforceHTTPException(TapSalesforceException):
pass

0 comments on commit c42fdc1

Please sign in to comment.