The problem is the user is attempting to unregister a device after it has been unregistered.
The Android library deletes the tokens after unregistration. If you call unregister again you do not have the token so the url called is of the format "http://127.0.0.1:8080/ag-push/rest/registry/device/" AND NOT "http://127.0.0.1:8080/ag-push/rest/registry/device/someDeviceToken" which is what the Delete is mapped to. Ergo 405 instead of 404.
We will do a check to see if the device is in the unregistered state and provide an appropriate message in the onFailure callback as an IllegalStateException.
|