Fix typo and add logging handling
Fix tests to return 400 with error message if bad request.