cmu-delphi / epidatr

Delphi Epidata API R Client
https://cmu-delphi.github.io/epidatr/
Other
1 stars 5 forks source link

Consider more specific error message when incorrect value is entered for epidatr #279

Open tinatownes opened 6 months ago

tinatownes commented 6 months ago

When using the epidatr API, if an incorrect value is entered in an attempt to fetch data for a signal, the only message received is: image Is it possible to have a more descriptive warning message that informs user what actual value is incorrect?

In this example, source = "fb-survey" is incorrectly written as "fb_survey", but the warning message does not specify what value is problematic: image

melange396 commented 4 months ago

There are a number of reasons that the API server doesn't currently validate request parameters, but it would not be "too hard" to do stuff client-side that checks to see that the requested values are present in the metadata... ¯\_(ツ)_/¯

dshemetov commented 4 months ago

Agreed, that error message is not very helpful and the source + signal names are very fragile. This should be quite doable, especially given that we already have code that parses metadata and builds a table of available source-signal pairs.