https://linen.dev logo
#connector-development
Title
# connector-development
k

Kirsten Hipolito

04/03/2022, 11:21 PM
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

Sherif Nada

04/03/2022, 11:43 PM
set
raise_on_http_errors = False
in your stream and process the 400 response in
parse_response
or
read_records
k

Kirsten Hipolito

04/06/2022, 12:42 AM
thank you @Sherif Nada! i'll try this out 😄
3 Views