API troubles list issues #24893
-
Hello! I’m using the GitHub API in one of my project since a few months, and i’m dealing with a problem i never seen before Sometimes, this request : “https://api.github.com/repos/Homebrew/homebrew-cask/issues?per_page=1&state=all” don’t return me anything. I have no answer at all It seems to happen only on the repository Homebrew/homebrew-cask, i never get it with another repository We can reproduce it by using this commands in the terminal :
And run it many times until get a empty answer Hope someone can find where are the troubles :slight_smile: |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
Hi @joan-saum, When I try with different state parameters, I get a result with “open” but not with “closed”. It is possible that the API is having an issue with the number of closed issues in that repository or maybe there’s an issue with a particular issue or pull request. I’ll let our product team know and see if they have any further insight. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks for you reply @that-pat, let me know if you get some news ! |
Beta Was this translation helpful? Give feedback.
-
Are you certain that you aren’t running into API rate limits? The reason why I ask is because asking for only one issue per page means that you’re going to run into your rate limit 30 times faster than not including the |
Beta Was this translation helpful? Give feedback.
-
Hello @lee-dohm My soft used the So my logic is : i call only one time the road /issues?per_page=1 and i look at the variable LastPage the number. Because there is only 1 issue per page, the LastPage indicate the number of issues. I don’t iterate on all issues Usually, if i run into API rate limits, i got an explicit error message. I just tried 20 min ago to run many times the command:
I run this command maybe around 40 times (manually, without a script). I got one time this answer :
And one other time, i got no answer at all, like what i describe in my first post. The others answers was good. So, very rarely there is an error |
Beta Was this translation helpful? Give feedback.
-
Do you get the same error when you don’t include the You would only have to issue two queries to get the same information. One to get the first page, which gives you the last page URL, then another to get the last page of issues. Count the number of pages, multiply by the number of items per page (defaults to 30), plus the number of items on the last page. That gives you the count of issues in two queries. |
Beta Was this translation helpful? Give feedback.
-
Yes Actually, i tried many times this request (list all issues) :
With the And then i tried this request (list only closed issues):
Again, with the I made a screenshot of my terminals, so you can also see the exact time of the request and your technical team can see the logs at this time PS : The text before the request is the answer of github API with the same request. It show that sometimes it work. |
Beta Was this translation helpful? Give feedback.
-
Hi @that-pat Any news from your product team about this error ? |
Beta Was this translation helpful? Give feedback.
-
@joan-saum, nothing definitive, unfortunately. They did experience an outage around the time that you asked this question which could have impacted the service in question. Have you gotten different results when trying again? |
Beta Was this translation helpful? Give feedback.
-
Yes i did You can see my conversation with lee-dohm below. I tried monday again and i got some problems to list closed issue. I also post a screenshot of my terms so the tech team can see the exact time of my requests |
Beta Was this translation helpful? Give feedback.
-
@joan-saum, hm. That’s good information to have. Unfortunately, I think that might be beyond my level of expertise for troubleshooting this issue in a forum setting. Have you contacted private support? If you haven’t, you may want to so that we can do some advanced troubleshooting with you. You can submit a link to this forum post to prevent having to repeat yourself. |
Beta Was this translation helpful? Give feedback.
@joan-saum, hm. That’s good information to have. Unfortunately, I think that might be beyond my level of expertise for troubleshooting this issue in a forum setting. Have you contacted private support? If you haven’t, you may want to so that we can do some advanced troubleshooting with you. You can submit a link to this forum post to prevent having to repeat yourself.