<div dir="ltr">No, it&#39;s more like<div><br></div><div>* may not be null</div><div>* is to long </div><div><br></div><div>etc</div><div><br></div><div>Not providing IDs, credentials etc. Makes sense ?</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 2:32 PM, Kris Borchers <span dir="ltr">&lt;<a href="mailto:kris@redhat.com" target="_blank">kris@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">I will say +1 for this as long as none of the error messages returned introduce security issues by exposing too much info.<div><br><div><div><div class="h5"><div>On Sep 18, 2013, at 4:27 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Following up on [1], currently we give 400 (Bad Request), with no good meaning, when creating/updating a PushApplication or a Variant;<div><br></div>
<div><br></div><div>The HTML page(!) simply says &quot;The request sent by the client was syntactically incorrect &quot;</div>
<div><br></div><div>As suggested in [1] a good idea is using Bean Validation and returning better errors. </div><div><br></div><div>The result would be a 400 (Bad Request) response, containing the errors and their messages as a JSON object (instead of a HTML page).</div>

<div><br></div><div>E.g.:</div><div><br></div><div>{&quot;name&quot;:&quot;may not be null&quot;}<br></div><div><div><br></div><div>This is a) more meaningful and we can also get rid of our &#39;hard-coded&#39; validation rules, like:</div>

<div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/AndroidVariantEndpoint.java#L79-L82" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/AndroidVariantEndpoint.java#L79-L82</a><br>

</div><div><br></div><div>-Matthias</div><div><br></div><div><br></div><div>[1] <a href="https://issues.jboss.org/browse/AGPUSH-255" target="_blank">https://issues.jboss.org/browse/AGPUSH-255</a></div><div><br>-- <br>Matthias Wessendorf <br>

<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>

twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div></div></div></div><div class="im">
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div>
</blockquote></div><br></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>