Merge pull request #82 from travis-ci/hh-handle-json-parsererrors

Handle JSON parsing errors
This commit is contained in:
Konstantin Haase 2013-10-26 06:47:52 -07:00
commit 3c8721eac3

View File

@ -19,6 +19,11 @@ class Travis::Api::App
"This feature has not yet been implemented. Sorry :(\n\nPull Requests welcome!"
end
error JSON::ParserError do
status 400
"Invalid JSON in request body"
end
# hotfix??
def route_missing
@app ? forward : halt(404)