Appreciate it.

On Fri, Apr 22, 2016 at 11:02 AM Hwansung Yu <[email protected]> wrote:

> I agree to throw explicit exception.
> I created an issue.
>
> https://issues.apache.org/jira/browse/S2GRAPH-67
>
>
>
> On Wed, Mar 23, 2016 at 2:49 PM, DO YUNG YOON <[email protected]> wrote:
>
> > Hi Hwansung.
> >
> > Seems like it is validation check issue on 'experiment' routes on s2rest.
> > I think it is better to throw explicit exception(dedicated exception or
> > BadQueryException which currently exist).
> > Not only this cases, but also I think there is lots to work on regarding
> > exception handling on controller at s2rest.
> > Can you create issue on exception handling on rest? I am definitely up
> for
> > this and willing to work on this.
> >
> >
> > On Wed, Mar 23, 2016 at 2:22 PM Hwansung Yu <[email protected]>
> wrote:
> >
> > > 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