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

Descriptive API error messages #2

Closed
c-zippel opened this issue Dec 3, 2019 · 2 comments
Closed

Descriptive API error messages #2

c-zippel opened this issue Dec 3, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@c-zippel
Copy link
Member

c-zippel commented Dec 3, 2019

The program can't show descriptive error messages if the Census API does not return data, because it parses the JSON response as a delimited text file (and uses string functions to take out the brackets and quotes). Hence, if the API response is not parseable as a delimited text file (i.e. an error message is returned instead of data), then the resulting data will be empty and the program will exit (r(N) == 0).
My proposed solution, short of changing how the program parses the JSON so it has more flexibility to pass on error messages from the Census, is to:

  • Always return a link to the API call (see issue Display link to API call instead of text #1 ) so that users can click it to view the error message in their browser; and
  • Expand the current error message to include more reasons why the API call could have failed
@c-zippel c-zippel changed the title Need more helpful API error messages Descriptived API error messages Dec 3, 2019
@c-zippel c-zippel changed the title Descriptived API error messages Descriptive API error messages Dec 3, 2019
@c-zippel c-zippel added the enhancement New feature or request label Dec 3, 2019
@c-zippel
Copy link
Member Author

okay, unlike most APIs census doesn't return error messages in the JSON; they're in the header which Stata can't read. so best we can do is the options in bullets, both of which implemented in dev version

@c-zippel
Copy link
Member Author

issue superceded by #37

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

No branches or pull requests

1 participant