You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Hwansung Yu (JIRA)" <ji...@apache.org> on 2016/04/22 04:01:12 UTC

[jira] [Created] (S2GRAPH-67) Experiment route invalid json error handling.

Hwansung Yu created S2GRAPH-67:
----------------------------------

             Summary: Experiment route invalid json error handling.
                 Key: S2GRAPH-67
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-67
             Project: S2Graph
          Issue Type: Task
            Reporter: Hwansung Yu
            Priority: Minor


This issue about when query with invalid json on experiment route, s2rest 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 s2rest result.

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

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

So experiment controller should outputs an error when query with invalid json.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)