graph_helpers.py: Retry-After parser assumes integer-seconds, crashes on HTTP-date
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in src/entrabot/graph_helpers.py at L64 and inspect how the Retry-After header is handled in the retry path. Verify behavior for integer seconds, an HTTP-date, and an unparsable value; done means HTTP-date throttling retries instead of raising ValueError, with 10 seconds as the final fallback.
Written by the indexing model from the issue text.
Description
File: src/entrabot/graph_helpers.py
Location: L64
Category: bug
Priority: medium
Description
wait = int(resp.headers.get("Retry-After", "10")) — RFC 7231 §7.1.3 explicitly allows Retry-After to be an HTTP-date. int(date_string) raises ValueError, so the retry path crashes the entire call instead of retrying. The crash converts a transient throttle into a hard provisioning failure.
Suggested fix
Try int() first; on ValueError, parse with email.utils.parsedate_to_datetime and compute seconds-until; final fallback to 10s.
Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #30.
- Dominant language
- Python
- Stars
- 9
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/entrabot
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
tools: Previous response not closed before retry — connection pool can leak under sustained 429/5xx Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in microsoft/entrabot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100