-
Notifications
You must be signed in to change notification settings - Fork 162
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
Timeout errors when refreshing tokens #614
Comments
Hi @NelsonFrancisco taking a look at this and my proposed solution is to update XeroClient to allow for configurable custom.setHttpOptionsDefaults({
retry: {
maxRetryAfter: this.config.httpTimeout || 3500
},
timeout: this.config.httpTimeout || 3500
}) Thoughts? Would this resolve your issue? |
It might solve the issue indeed. |
Im also now getting this error, so the timeout in this SDK is non-configurable? |
Hey all. Just catching up after the Thanksgiving holiday. @NelsonFrancisco if you want to submit a PR for that we'd welcome your contribution. |
Hey, Not sure if you where going to do it or not @NelsonFrancisco so I have just quickly put #616 up, hope you don't mind/ hadn't started! |
SDK you're using
Describe the bug
I have an application that manages integrations with several Xero organisations and, hourly, calls Client.refreshToken hundreds of times (one time per organisation) within an interval of 1 or 2 seconds.
We've been getting a lot of timeouts lately. All of them to 3500ms
Here's the error in detail:
Please keep in mind that the error does not trigger for every request. Only for some.
I've already contacted Xero's support, and they told me to open a Issue in Github. So here it is.
There is a history already in the emails, so I'll try to sum it up:
So, assuming this is true, can your servers take more than 3500ms to answer the refresh token request?
Is there any way around this situation?
To Reproduce
Everytime we need to refresh token for 200+ organisations, we get these errors.
Expected behavior
The calls to XeroClient.refreshToken not to timeout and return the new token
The text was updated successfully, but these errors were encountered: