[aerogear-dev] Unified Push responds with 404 if no installations exist for a variant
Tadeas Kriz
tkriz at redhat.com
Fri May 30 11:27:23 EDT 2014
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? 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
More information about the aerogear-dev
mailing list