You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the API endpoint by default is expected to return a list of errors, in the case where there are no errors it will return an empty list. However, the retry plugin specifically checks to see if the errors list exists in the response:
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
What happened?
the @octokit/plugin-retry package is unable to handle calling the Github API endpoint to list CODEOWNERS errors (https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-codeowners-errors).
Since the API endpoint by default is expected to return a list of errors, in the case where there are no errors it will return an empty list. However, the retry plugin specifically checks to see if the errors list exists in the response:
plugin-retry.js/src/wrap-request.ts
Line 37 in dcf1fa3
The retry plugin will then try to log the first error message. This will throw an error if the list is empty.
Here is the code I am using
When I run this code I get an error message from the octokit/plugin-retry, however when I remove the retry plugin, I get a success response.
See the Relevant log output section for the error message I am getting.
Versions
Node v18.16.0, @octokit/core v6.1.1, @octokit/plugin-retry v7.1.0
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: