currently, for invalid requests (with status 4xx) the server sends an html response body.
since the server API is used by client software and not humans, and since all other responses are json (except to "get /"), change the body on all status 4xx and 5xx responses to json:
{ msg: "error message here" }