signal icon indicating copy to clipboard operation
signal copied to clipboard

Rate limit not handled

Open uumas opened this issue 4 years ago • 2 comments

The bridge should probably give a nice error message when encountering signal rate limits on register. Currently it prints the following traceback:

Traceback (most recent call last):
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
    await self._run_handler(handler, evt)
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
    return await self._handler(evt)
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix_signal/commands/auth.py", line 80, in register
    username = await evt.bridge.signal.register(phone)
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 94, in register
    voice=voice, captcha=captcha)
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 157, in request
    resp_type, resp_data = await self._raw_request(command, **data)
  File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 154, in _raw_request
    return await future
mausignald.errors.UnexpectedError: Rate limit exceeded: 413

This can be triggered by trying to register with the same phone number ~5 times.

uumas avatar Jan 09 '21 22:01 uumas

Any workaround for the limit that you know?

yajo avatar Jan 13 '21 21:01 yajo

Wait 1 to 24 hours. The rate limit is only triggered if trying to register the same number multiple times so it shouldn't be a huge problem.

uumas avatar Jan 13 '21 21:01 uumas