When  I query with invalid json by s2ab,
s2graph doesn't any notice for user.

For example,

curl -X POST -H "Content-Type: application/json" -d '{
 "[[user_id]]": "A"
 "[[filter]]" : "(1,2,3)"
}'
'localhost:9000/graphs/experiment/f1f2a18e-b83e-4828-9441-746e674907e2/test/test

Above json body is invalid, because it is missing comma after "A".


Below is s2graph result.

{
  "size": 0,
  "degrees": [],
  "results": [],
  "isEmpty": true
}

Users of s2graph are hard to find mistakes, because any errors doesn't
occur.

I have two ideas in this case.

First, experiment controller outputs an error instead of sending json body
to query controller.
Seconds, s2graph result contains status field. (like, "status" : "invalid
json")


Is there any idea?



Regards.
Hwansung Yu

Reply via email to