when the wanikani server software is being updated, the service's API continues to respond, but the response bodies are junk data.
This program assumes response bodies always contain well formed JSON, so when a junk response is received, the resulting parse exception is not handled, resulting in the termination of the program.
the wanikani service is rarely in this state. Typically it is either reachable and returns well-formed JSON or it is completely unreachable.
Current program behaviour
The program prints to standard out:
unhandled json parsing error, the unparsable string, then exits
Description of solution
If json parsing fails, go to an error state, set the tooltip to an error message, "could not understand respones from server" + any additional info. Maybe add a "?" icon and use that, to visibly distinguish between a network error and a parse failure.
Description of problem
when the wanikani server software is being updated, the service's API continues to respond, but the response bodies are junk data. This program assumes response bodies always contain well formed JSON, so when a junk response is received, the resulting parse exception is not handled, resulting in the termination of the program.
the wanikani service is rarely in this state. Typically it is either reachable and returns well-formed JSON or it is completely unreachable.
Current program behaviour
The program prints to standard out: unhandled json parsing error, the unparsable string, then exits
Description of solution
If json parsing fails, go to an error state, set the tooltip to an error message, "could not understand respones from server" + any additional info. Maybe add a "?" icon and use that, to visibly distinguish between a network error and a parse failure.