You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
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:
The text was updated successfully, but these errors were encountered: