404 while creating new PR review #24591
-
Hi, I’m trying to use the PR review API for creating new reviews and new review comments. The following request should work, but returns 404
I have also tried using the official library The related PR is NOMERGE: FL comments test PR by andre15silva · Pull Request #1 · andre15silva/failingProject · GitHub, which does exists and should be available. Am I missing something? Best |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, So I finally found the issue. The token I was using didn’t have the permission This is really confusing tho, since the return code is IMO, for this to be more user friendly, the required permissions should be explicit on the API documentation and the return code for the operation with a lack-privileged token should be 403. |
Beta Was this translation helpful? Give feedback.
-
403 (and 410) aren’t used by a lot of systems because they leak the existence of things that someone might never have been entitled to know. That said, some of the errors are indeed (dev) user hostile, and it’s possible that the linked page could note what permissions are generally required. |
Beta Was this translation helpful? Give feedback.
Hi,
So I finally found the issue. The token I was using didn’t have the permission
public_repo
, and so didn’t work.This is really confusing tho, since the return code is
404
and no information about what permissions are required is given in the API documentation.IMO, for this to be more user friendly, the required permissions should be explicit on the API documentation and the return code for the operation with a lack-privileged token should be 403.