Add bad request handler

Respond with a 400 bad request on conversion or validation errors.