tripleee / sloshy

Sloshy the Thawman, a simple chatbot to keep rooms alive on Stack Overflow / Stack Exchange
6 stars 11 forks source link

Retry in the face of errors #8

Closed tripleee closed 3 years ago

tripleee commented 3 years ago

The putative fix for #6 still failed last night after 19 rooms.

https://github.com/tripleee/sloshy/runs/2900824119?check_suite_focus=true

The Github Actions transcript contains an error message from the chat server:

ERROR:root:Attempt 1: denied: unknown reason 'You can perform this action again in 1 second.'

Apparently I should add a back-off of some sort to cope in this situation.

tripleee commented 3 years ago

https://github.com/Manishearth/ChatExchange/blob/cac2a75e84031af67c6d23d623656fe5be825276/chatexchange/client.py#L281 looks for the "TOO_FAST_RE" message with re.match() which apparently fails because the message has a beginning quote. Thinking this might be a bug in ChatExchange. Did the format change?

tripleee commented 3 years ago

Wait, it looks like "Attempt 1:" means it actually retried after getting throttled. I guess something else went wrong after that.

tripleee commented 3 years ago

It was yet another regression of #6