diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java index 0d2031f9cc..55e8f14382 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java @@ -233,8 +233,8 @@ public String update(@Context GraphManager manager, if (jsonEdge.id != null) { E.checkArgument(id.equals(jsonEdge.id), - "The ids are different between url('%s') and " + - "request body('%s')", id, jsonEdge.id); + "The ids are different between url and " + + "request body ('%s' != '%s')", id, jsonEdge.id); } // Parse action param @@ -458,8 +458,11 @@ private Id getEdgeId(HugeGraph g, JsonEdge newEdge) { HugeVertex.getIdValue(newEdge.target)); if (newEdge.id != null) { E.checkArgument(edgeId.equals(newEdge.id), - "The sort key values either be null " + - "or equal to origin when specified edge id"); + "The ids are different between server and " + + "request body ('%s' != '%s'). And note the sort " + + "key values should either be null or equal to " + + "the origin value when specified edge id", + edgeId, newEdge.id); } return edgeId; } diff --git a/hugegraph-test/src/main/java/com/baidu/hugegraph/api/EdgeApiTest.java b/hugegraph-test/src/main/java/com/baidu/hugegraph/api/EdgeApiTest.java index f366178433..a7b9abfd53 100644 --- a/hugegraph-test/src/main/java/com/baidu/hugegraph/api/EdgeApiTest.java +++ b/hugegraph-test/src/main/java/com/baidu/hugegraph/api/EdgeApiTest.java @@ -107,7 +107,7 @@ public void testBatchUpdate() throws IOException { // Now allowed to modify sortkey values, the property 'date' has changed content = assertResponseStatus(400, r); Assert.assertTrue(content.contains( - "either be null or equal to origin when " + + "either be null or equal to the origin value when " + "specified edge id")); // Update edge without edgeId