[aerogear-dev] Unified Push responds with 404 if no installations exist for a variant
Matthias Wessendorf
matzew at apache.org
Fri May 30 11:36:34 EDT 2014
On Fri, May 30, 2014 at 5:27 PM, Tadeas Kriz <tkriz at redhat.com> wrote:
> Hey,
>
> while aligning integration tests with 0.11.0, I’ve found a changed
> behaviour when requesting list of installations for a variant. Before the
> change, if I used wrong (non-existent) variant ID, I got 404 Not Found, and
> when I used existing variant ID, I got a response with an empty json array.
> That way I could easily say if the variant id was wrong or not. Now, I get
> 404 even when the variant ID is correct, but the variant has no
> installations. The old code: [1] and the new code: [2]
>
> My question is, if this is by design?
Nope - that is a bug;
Can you file a JIRA for it ?
Thanks!
> And if so, why doesn’t variant listing work the same way? From [3] I
> understand that it responds with an empty json array when there are no
> android variants for the given push application ID and with 404 if the push
> application ID is wrong. I just want to be sure before changing integration
> tests to expect the 404 instead of an empty json array.
>
> Thanks
>
> 1 -
> https://github.com/aerogear/aerogear-unifiedpush-server/blob/2ecf73ea4e3bf4d82705222a219a62f7c8af04bb/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/InstallationManagementEndpoint.java#L56-L60
> 2 -
> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/InstallationManagementEndpoint.java#L62-L64
> 3 -
> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/AndroidVariantEndpoint.java#L84-L86
>
> —
> Tadeas Kriz
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140530/dff05681/attachment.html
More information about the aerogear-dev
mailing list