[aerogear-dev] Question about retrieving an AeroGearUser ?
Bruno Oliveira
bruno at abstractj.org
Fri Jan 11 11:06:56 EST 2013
+1 for an empty user if you're just doing a query.
+1 for throw a runtime exception BRUTAL (if you're check if the user can login)
AG Sec will handle this exception and return the appropriate HTTP status code. Something like "401 - I'm brutal"
--
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile
On Friday, January 11, 2013 at 1:01 PM, Sebastien Blanc 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 at lists.jboss.org (mailto:aerogear-dev at lists.jboss.org)
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130111/c8b111bb/attachment.html
More information about the aerogear-dev
mailing list