Make endpoints return 400 instead of 500
Merge pull request #2124 from brendandburns/fix

Make endpoints return 400 instead of 500