Hello! I'm currently making a <Sift> source connec...
# connector-development
k
Hello! I'm currently making a Sift source connector, specifically using the Score API to get Sift's latest score for a given customer ID (and the corresponding reasons for the score), and I do this for a list of customer IDs. I use Airbyte's Python source connector template to do this. However, sometimes the API returns a
400 Client Error: Bad Request
, because the scores are saved for only a certain amount of time, and scores from beyond that interval return that error. But, we can't pinpoint exactly which customer IDs were scored within that interval, so it's only through the 400 error code that we can tell. How can I modify the Python source connector template so that I can handle the 400 error myself, and it doesn't reflect as an error in a sync (causing the sync to be marked as 'failed')? Or what might be a better approach to handling these errors?
s
set
raise_on_http_errors = False
in your stream and process the 400 response in
parse_response
or
read_records
k
thank you @Sherif Nada! i'll try this out 😄