When response returns 500 or something other, it's retrying to send request again, but it will fail because:
https://github.com/Schmavery/facebook-chat-api/blob/master/utils.js#L597
The defaultFuncs field is undefined, I don't know why.
Any ideas?
Haha wow, we just saw this bug yesterday and couldn't believe it had never come up.
It's undefined because there's a recursive call right underneath (https://github.com/Schmavery/facebook-chat-api/blob/master/utils.js#L598) that doesn't pass it in.
Hopefully this actually fixes it. Feel free to reopen if not :D
Thanks for reminding us @GAMELASTER , can you try this fix?
@bsansouci @Schmavery
It's works! But it is repeating to infinity, I think it will be good to throw exception after some retries.
@GAMELASTER maybe it would be better to return an error instead of throwing an exception?
@ravkr exception is better in this way, in all promises where is used utils.parseAndCheckLogin have exception handling.
@GAMELASTER Hmm, I thought we had implemented it this way, but I guess not. I definitely intended it to only be retried a couple of times.
@bsansouci do you remember?
I totally remember writing it yes. I don't remember removing it.

Yeah I definitely believe you lol
We could do this by having parseAndCheckLogin take an optional numRetries parameter at the end that will count up in the recursive call until we hit some number (3? 5?) and then throw the exception.
It should also be waiting some small amount of time between requests, ideally. Maybe some random number from like .5 to 2 seconds?
@GAMELASTER do you think it would be possible for you to implement this for us?
It's solved by #429 !
Most helpful comment
We could do this by having parseAndCheckLogin take an optional numRetries parameter at the end that will count up in the recursive call until we hit some number (3? 5?) and then throw the exception.
It should also be waiting some small amount of time between requests, ideally. Maybe some random number from like .5 to 2 seconds?
@GAMELASTER do you think it would be possible for you to implement this for us?