add an error handler
Set content-type header when testing bad json input.