Retry on `M_LIMIT_EXCEEDED`

Open
#135 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start with HTTPAPI's existing retry handling and the MLimitExceeded path; inspect how retry_after_ms is read from the response and how backoff/retry_count are applied. Done means M_LIMIT_EXCEEDED waits for the specified delay when present and otherwise follows the existing fallback retry behavior, with coverage for both cases.

Written by the indexing model from the issue text.

Description

It seems currently the HTTPAPI may retry after waiting a while on some network and client errors, but raises MLimitExceeded errors.

I would like to have the API wait for the retry_after_ms time specified in the response, and fall back to the backoff/retry_count method if it is missing.

Dominant language
Python
Stars
249
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mautrix/python

All issues in mautrix/python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.