Error handling sample code with two methods for showing how to return a
JSON object with a 400 response