cmu-delphi / delphi-epidata

An open API for epidemiological data.
https://cmu-delphi.github.io/delphi-epidata/
MIT License
102 stars 68 forks source link

Add exception-on-error mode to python client #1507

Open melange396 opened 4 months ago

melange396 commented 4 months ago

Add a "mode" to the delphi-epidata python client that enables behavior in the ._request() method that will raise an exception when the row limit is encountered (result code 2). This can make it easier for users to know when they are missing data that they otherwise expected to receive.

possibly of note: the Epidata.check() method does something similar (raise an exception on anything but result==1) though it is seemingly unused except for in a few of our ancient/abandoned repos.