Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tinatownes opened this issue Feb 27, 2024 · 2 comments

Comments

@tinatownes
Copy link
Collaborator

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

@tinatownes tinatownes changed the title More specific error message needed when incorrect value is entered for epidatr Consider more specific error message when incorrect value is entered for epidatr Feb 27, 2024
@melange396
Copy link
Contributor

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 dshemetov transferred this issue from cmu-delphi/delphi-epidata May 8, 2024
@dshemetov
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants