expose content of response when a 403 or other http error occurs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing ghapi's HTTP error and exception handling entry point; the issue does not name a file or test. Confirm how a 403 response is converted into HTTP403ForbiddenError, then verify that callers can inspect the original response content, including GitHub's rate-limit message.
Written by the indexing model from the issue text.
Description
I spent a long time debugging this evening when I ran a loop that made 10 search queries. I got this error from ghapi:
HTTP403ForbiddenError: HTTP Error 403: Forbidden
But I couldn't figure out how to get the actual HTTP response object itself so that I could see the text of the response. GitHub actually provides very informative responses, like the following:
{"message":"API rate limit exceeded for [ip address redacted]. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
Documentation reveals that unauthenticated requests to search endpoints are rate-limited to 10 per minute. If ghapi can provide the full response when hitting these errors, it will help with debugging this and other issues, where GitHub rate limits, or detects some abuse, or some other issue.
- Dominant language
- Python
- Stars
- 687
- Forks
- 69
- Avg merge
- 1m
- Merged PRs (30d)
- 2
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 AnswerDotAI/ghapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AnswerDotAI/ghapi#158 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AnswerDotAI/ghapi#120 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
AnswerDotAI/ghapi#208 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
AnswerDotAI/ghapi#201 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AnswerDotAI/ghapi#186 ·
All issues in AnswerDotAI/ghapi
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100