PatrickWeller / PanelPal

1 stars 0 forks source link

Add error handling and logging to variant_validator_api_functions.py #36

Closed madysonic closed 1 week ago

madysonic commented 2 weeks ago

Currently, an exception is raised for API response status but no other error handling exists.

Common issue seems to be "429" - Too Many Requests which just requires waiting and trying again.

Also need to add logging and tests.

RVel37 commented 2 weeks ago

I've also added a while loop to get_gene_transcript_data() with a time sleep function that waits and retries a certain number of times (adjustable) if the request times out. The time between retries increases exponentially to increase likelihood of success. This seems to work reliably but may require further testing/adjustment later down the line.

PatrickWeller commented 1 week ago

63 will continue to handle the sleep time needed to have the requests to the API work correctly without having too many request.