openclaw - 💡(How to fix) Fix Feishu plugin lacks retry logic for API rate limit errors [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70879Fetched 2026-04-24 10:38:23
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
renamed ×1

Error Message

Feishu's custom bot has a per-minute API call rate limit (100 requests/min). When the sending frequency approaches this limit, Feishu server returns error codes like 2200 (internal error) or 11232 (flow control). Suggestion: add exponential backoff retry logic for Feishu message sending, targeting retryable error codes (2200, 11232, 429, etc.) to improve delivery reliability.

RAW_BUFFERClick to expand / collapse

Feishu's custom bot has a per-minute API call rate limit (100 requests/min). When the sending frequency approaches this limit, Feishu server returns error codes like 2200 (internal error) or 11232 (flow control).

Currently, OpenClaw's Feishu plugin treats these errors as regular exceptions — it logs them and continues, without any retry mechanism. This means when a send fails due to rate limiting, there's no recovery: the sender assumes the message was sent, but the receiver never gets it.

This doesn't only affect long (chunked) messages — any message can fail whenever the send frequency hits the limit. It's purely a frequency issue.

Suggestion: add exponential backoff retry logic for Feishu message sending, targeting retryable error codes (2200, 11232, 429, etc.) to improve delivery reliability.

extent analysis

TL;DR

Implement exponential backoff retry logic for Feishu message sending to handle rate limit errors.

Guidance

  • Identify and target specific retryable error codes (2200, 11232, 429, etc.) for Feishu API calls
  • Design an exponential backoff strategy to space out retries and avoid further rate limiting
  • Consider implementing a maximum number of retries to prevent infinite loops
  • Verify the effectiveness of the retry mechanism by monitoring message delivery success rates

Example

import time
import random

def send_message_feishu(message):
    retry_codes = [2200, 11232, 429]
    max_retries = 5
    retry_delay = 1  # initial delay in seconds

    for attempt in range(max_retries):
        try:
            # send message via Feishu API
            response = feishu_api_send_message(message)
            if response.status_code == 200:
                return True
            elif response.status_code in retry_codes:
                # exponential backoff
                retry_delay *= 2
                retry_delay += random.uniform(0, 1)  # add jitter
                time.sleep(retry_delay)
            else:
                return False
        except Exception as e:
            # handle other exceptions
            return False
    return False

Notes

This solution assumes that the Feishu API returns error codes consistently and that the exponential backoff strategy is effective in avoiding rate limiting. However, the optimal retry strategy may vary depending on the specific use case and Feishu API behavior.

Recommendation

Apply workaround: implement exponential backoff retry logic for Feishu message sending, as it directly addresses the rate limiting issue and improves delivery reliability.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING