Added a try/catch block, which will log any errors caused by maliciously formed requests and reply with an error message. (Previously, they would just crash the server.)