Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pr.listReviews().toList(); throws GHFileNotFoundException #1768

Open
daniel-b2c2 opened this issue Dec 5, 2023 · 1 comment
Open

pr.listReviews().toList(); throws GHFileNotFoundException #1768

daniel-b2c2 opened this issue Dec 5, 2023 · 1 comment
Labels

Comments

@daniel-b2c2
Copy link

Describe the bug
List<GHPullRequestReview> ghPullRequestReviews = pr.listReviews().toList();
The above code should return an empty list if no reviews exist, instead it throws GHFileNotFoundException

To Reproduce
Steps to reproduce the behavior:

  1. Create a pull request (but do not review it)
  2. Search for that pull request, and then list reviews as shown in the code snippet above.
  3. Observe the exception thrown.

Expected behavior
Return an empty list when there are no reviews.

Desktop (please complete the following information):

  • OS: mac
  • Browser NA
  • Version 1.318

Additional context
I think this is a regression and this behaviour wasn't like this in previous versions?

@daniel-b2c2 daniel-b2c2 changed the title List<GHPullRequestReview> ghPullRequestReviews = pr.listReviews().toList(); throws GHFileNotFoundException pr.listReviews().toList(); throws GHFileNotFoundException Dec 5, 2023
@bitwiseman bitwiseman added the bug label Dec 7, 2023
gsmet added a commit to gsmet/github-api that referenced this issue Mar 9, 2024
I couldn't reproduce the problem described in hub4j#1768 but I thought we
could add a test anyway as it doesn't cost us much.
@gsmet
Copy link
Contributor

gsmet commented Mar 9, 2024

I tried to reproduce your issue here: #1809

And I couldn't. Maybe it was a transient problem on the GitHub API side?

Please let us know if you can still reproduce it, and if so, a small Maven project reproducing the issue would be very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants