Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more exhaustive data in the result parameters. #329

Closed
Haakh opened this issue Oct 26, 2018 · 1 comment
Closed

Support more exhaustive data in the result parameters. #329

Haakh opened this issue Oct 26, 2018 · 1 comment

Comments

@Haakh
Copy link

Haakh commented Oct 26, 2018

Support more data inside the result parameters, in the example below see I'm trying to send notification to 4 device tokens. Out of which 2 are successful and 2 error out.
Android Response:

"results":[
  {"message_id":"0:1540545319375832%082a886ef9fd7ecd"},
  {"error":"NotRegistered"},
  {"message_id":"0:1540545319370910%082a886ef9fd7ecd"},
  {"error":"NotRegistered"}
]}

All I know from the result is that 2 tokens error out, but i'm not sure which ones.
As you can see the tokens that errored out sent just the error message and not the respective token alongside it.
The result data should be more consistent: as in each object related to a token should have the token status and the response( success or failure reason).

Suggested response:

[ 
  {"deviceId": "***", "status": "400", "response": {"reason": "BadDeviceToken"}},
  {"deviceId": "****", "status": "200"}
]
@eladnava
Copy link
Collaborator

Hi @Haakh,
Thanks for the suggestion, there is a duplicate issue for this (an easier way to identify invalid tokens):
#226 (comment)

Closing this one, please continue discussion there. If you would like to submit a PR that would be greatly encouraged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants