Skip to content

Commit

Permalink
fix(google-ads): handle unexpected errors during validation (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
debanjan97 committed Dec 6, 2023
1 parent 72f9b1b commit 4db49cc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ def check_connection(self, logger: logging.Logger, config: Mapping[str, Any]) ->
error_messages = ", ".join([error.message for error in exception.failure.errors])
logger.error(traceback.format_exc())
return False, f"Unable to connect to Google Ads API with the provided configuration - {error_messages}"
except Exception as e:
# fallback for all the unhanded exceptions
logger.error(traceback.format_exc())
return False, f"Unable to connect to Google Ads API with the provided configuration - {repr(e)}"

def streams(self, config: Mapping[str, Any]) -> List[Stream]:
config = self._validate_and_transform(config)
Expand Down

0 comments on commit 4db49cc

Please sign in to comment.