[18.09 backport] API: properly handle invalid JSON to return a 400 status Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267 Component: engine
[18.09 backport] API: properly handle invalid JSON to return a 400 status Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267 Component: engine