On 18 Sep,2013, at 11:27 , Matthias Wessendorf <matzew(a)apache.org> wrote:
Following up on [1], currently we give 400 (Bad Request), with no
good meaning, when creating/updating a PushApplication or a Variant;
+1 Totally, when I tried to use the tutorial I had no clue what I did wrong.
The HTML page(!) simply says "The request sent by the client was syntactically
incorrect "
As suggested in [1] a good idea is using Bean Validation and returning better errors.
The result would be a 400 (Bad Request) response, containing the errors and their
messages as a JSON object (instead of a HTML page).
E.g.:
{"name":"may not be null"}
This is a) more meaningful and we can also get rid of our 'hard-coded' validation
rules, like:
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/m...
-Matthias
[1]
https://issues.jboss.org/browse/AGPUSH-255
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev