-
-
Notifications
You must be signed in to change notification settings - Fork 11
possible error in quota handling? #114
Comments
Are you running your app on #113? What version of Node are you running? I'm on 10.9.0. |
service is on node 9.6.1 right now, and i'm reasonably certain it's using the most recent commit here . . . i haven't replicated the problem, yet, but it does seem that somewhere someone has done a setTimeout with Infinity, which doesn't sound like anything i'm doing on the app that uses mws-advanced... but i need to go over it with a comb to make sure. |
I'm writing some test functions for Queue (also see my pull request) and I encountered the same error when running into a max quota without setting a restore rate. I think the problem is in the following:
The default restore rate is 0. Hence, this expresspession evaluates to inifity. In addition, the following in index.js might also cause the restore rate to be 0:
Hope this helps. |
There is also a timer in
|
Thanks for finding that, I had a feeling that was something involving time and division. I honestly thought node would throw a runtime error for division by zero rather than returning Infinity, though. heh. looks to me like it should be |
Exactly! I was thinking about setting the default value to 1. But than I thought, perhaps we should throw an error. Personally I have a preference for an error, because I don't expect that we'll ever have to deal with an MWS endpoint which has no restore rate. |
well, there's a bunch of quota rate that just has never had the data filled in, and i'm not sure if that's because documentation was lacking, or i just didn't get to it, because the calls weren't useful to my purposes at the time. i might be using a mws call that doesn't have a helper wrapper thing. |
just received this on my service, a few times, i'm not sure if it's related to the new quota handling code, or if it's something inside my app service.
The text was updated successfully, but these errors were encountered: