return bad response instead of a 500
Merge pull request #829 from dimagi/bad

return bad response instead of a 500