Skip to content
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

Add retry handler for matrix rate limits #121

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Conversation

aofn
Copy link
Member

@aofn aofn commented Jan 9, 2024

Uses retry_after_ms from the error response to await ratelimiting and retry the failed request.

  • fix bug where creating rooms loops and doesn't proceed with adding the room to its parent
  • display user feedback while syncing
  • add translations
  • use retry handler when creating application folder
  • use retry handler when creating service folders
  • use retry handler for /etherpad
  • use retry handler for /spacedeck

Testing:

  • try to encounter rate limits. for example create at least 8 sketches directly in spacedeck (not from within spaces! the more the better, since this should trigger ratelimiting by [matrix])
  • open /spaces and go to /spacedeck
  • /spacedeck will now try to sync all sketches and, if it runs into ratelimits, should automatically wait until it tries again

This PR continues from #71 after some technical difficulties 🧑‍🔧

Marcel and others added 30 commits September 27, 2023 12:47
…ate call. fixes issue with room creation in retry handler.
…e it handleRateLimit. Add default translation for errors.
refactor: catch errors during retrying when creating application or service spaces
@aofn aofn marked this pull request as ready for review January 9, 2024 14:20
@aofn aofn requested a review from fnwbr January 9, 2024 14:20

return room;
},
[auth, matrix, matrixClient],
[auth, matrix, etherpad],

Check failure

Code scanning / ESLint

verifies the list of dependencies for Hooks like useEffect and similar Error

React Hook useCallback has an unnecessary dependency: 'auth'. Either exclude it or remove the dependency array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants