Handle JSON parsing errors
This commit is contained in:
parent
8ff052792c
commit
dd5cf36eee
|
@ -19,6 +19,11 @@ class Travis::Api::App
|
||||||
"This feature has not yet been implemented. Sorry :(\n\nPull Requests welcome!"
|
"This feature has not yet been implemented. Sorry :(\n\nPull Requests welcome!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
error JSON::ParserError do
|
||||||
|
status 400
|
||||||
|
"Invalid JSON in request body"
|
||||||
|
end
|
||||||
|
|
||||||
# hotfix??
|
# hotfix??
|
||||||
def route_missing
|
def route_missing
|
||||||
@app ? forward : halt(404)
|
@app ? forward : halt(404)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user