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
When the BookwormAPI fails, it doesn't send an HTML error code for clients to interpret.
Since the most recent commit, I can't find any failed queries from BookwormGUI, so this is low priority, I suppose. Here's a simulated query with an error, which provides a 200 Status Code:
Something breaks in the code and it actually raises an error
The query breaks in a predictable way that can yield a blank response. For instance, if a searched-for word is not in the database, or if the user specifies a metadata field that doesn't exist. Rather than throwing a blanket 500 error, it would be nice to send a specific message like
{"error":"No bookworm database of that name is available on the server"}
Note: this is just a copy of the issue filed by @organisciak at Bookworm-project/BookwormAPI#16, because the problem lives here now.
When the BookwormAPI fails, it doesn't send an HTML error code for clients to interpret.
Since the most recent commit, I can't find any failed queries from BookwormGUI, so this is low priority, I suppose. Here's a simulated query with an error, which provides a 200 Status Code:
http://bookworm.htrc.illinois.edu/cgi-bin/dbbindings.py?query={%22groups%22:[%22date_year%22],%22counttype%22:%22WordsPerMillion%22,%22words_collation%22:%22Case_Sensitive%22,%22database%22:%22hathipd%22,%22search_limits%22:[{%22word%22:[%22\\\%22],%22date_year%22:{%22$gte%22:1750,%22$lte%22:1923}}],%22method%22:%22return_json%22}
The text was updated successfully, but these errors were encountered: