Hey Seb,
I'd go with an exception which can be handled. You could perhaps have an
error route for it and have the choice of either forwarding to a view or
returning json as a response to the calling client.
/Dan
On 11 January 2013 16:01, Sebastien Blanc <scm.blanc(a)gmail.com> wrote:
Hi All,
In the scope of
https://issues.jboss.org/browse/AEROGEAR-803 , we have a
method to retrieve an user (based on its id). If the user don't exist it
returns null.
There were some suggestions to change that into :
- throwing a runtime exception (seems a bit brutal)
- or returning an empty user (can be confusing)
What is your opinion about this ?
Seb
ps: the method
https://gist.github.com/4510879
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev