Skip to content

Commit

Permalink
improve error logging in state
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 committed May 24, 2024
1 parent 1acd30b commit ef716fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions target_salesforce_v3/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,7 @@ def preprocess_record(self, record, context):
break

if not object_type:
self.logger.info(f"Record doesn't exist on Salesforce {self.stream_name} was not found on Salesforce.")
return {}
return {"error": f"Object {object_type} doesn't exist on Salesforce"}

# get record fields
try:
Expand Down Expand Up @@ -787,7 +786,7 @@ def preprocess_record(self, record, context):

def upsert_record(self, record, context):
# Not process records if target hit API rate limits
if record.get("error") and self._target.hit_rate_limit:
if record.get("error"):
return None, False, record
if record:
state_updates = dict()
Expand Down

0 comments on commit ef716fe

Please sign in to comment.