Commit b5485d6f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

invalid content produced 500 instead of 400 bad request

parent bf05b210
......@@ -72,6 +72,9 @@ public class ModelController extends BaseController {
@RequestBody String body) throws IOException, QueryException {
Map<String, Object> node = parseBody(body);
Map<String, Object> data = getData(node, "model");
if (data == null) {
throw new QueryException("model is not defined");
return modelController.updateModel(projectId, modelId, data);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment