CORE-4135: changed the HTTP status code for ERR_INVALID_JSON to 400