KarchinLab / open-cravat

A modular annotation tool for genomic variants
MIT License
113 stars 27 forks source link

Pass through errors in store_utils.get_file_to_string #123

Closed tenzinhl closed 1 year ago

tenzinhl commented 2 years ago

Fixes #121

Basically has exceptions in store_utils:get_file_to_string bubble up instead of being suppressed and converted to an empty string with no useful debugging information.

kmoad commented 2 years ago

This does what it needs to. I'll follow it up with a commit to fix callers of get_file_to_string. This has prompted some changes to our exception handling in general.

One change before merge.

Could you add r.raise_for_status() right before the HTTPError raise? It'll do a good job with descriptive error messages for 4xx and 5xx errors. For example, a 404 will generate something like

404 Client Error: Not Found for url: https://store.opencravat.org/breakurl/manifest-2.2.8.yml

The general HTTPError is still needed to catch everything else.

tenzinhl commented 1 year ago

Oops sorry for the delay on this, slipped my mind as I was transitioning back into school. Thanks for handling it