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

Current error handling prevents easy push to many recipients #13

Open
joviol opened this issue Nov 26, 2014 · 0 comments
Open

Current error handling prevents easy push to many recipients #13

joviol opened this issue Nov 26, 2014 · 0 comments

Comments

@joviol
Copy link

joviol commented Nov 26, 2014

As of right now, if an application needed to send push to many thousands of recipients, handling the error 401 might be problematic, unless we send the next push in the response of the previous one, which is impractical when so many need to be sent at once.

If for exemple I sent 1000 push in a forEach loop or even by calling setImmediate 1000 times, a problem would occur when the access token expires: An error 401 would come back many times before the first callback could be handled which would allow the app to put the new access token in the options.

Wouldn't it be easier to handle the access token internally with no need to have the client app do it. And knowing when an access token came in, eliminate all the new 401 errors after that, instead of calling obtainaccesstoken again and again?

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

1 participant