401 error when trying to resolve discussions in PRs #187503
Replies: 6 comments 5 replies
-
|
A 401 – “User is not authorized to resolve the conversation” usually means one of two things: either you don’t have permission to resolve that thread, or the thread is tied to an outdated commit after a force-push. On GitHub, only users with write access (or higher) to the repository can resolve review threads. If you’re just a reviewer without write permissions, GitHub blocks the action and returns 401 — even if the UI doesn’t clearly say so. The second likely cause is the force-push. When the author rewrites history, some review threads become attached to commits that no longer exist. That’s why “Jump to comment in diff” shows “commit range not found.” In that state, the UI may still show the thread in the side panel, but backend validation can fail when trying to resolve it. |
Beta Was this translation helpful? Give feedback.
-
|
This looks less like a permissions problem and more like a state/UX bug in the PR review UI. Both of your hypotheses are very plausible:
So my understanding is:
A fix would likely involve:
If you can share PR/thread IDs with GitHub Support, they should be able to confirm this and potentially link it to an existing internal issue. |
Beta Was this translation helpful? Give feedback.
-
|
This looks like a combination of permission constraints and UI inconsistency rather than a client-side issue. 1. Permission check (main cause of 401) 2. Already resolved thread (UI sync issue) 3. Force-push breaking thread context
Workarounds:
Suggested improvements:
Overall, this seems like a GitHub UX issue rather than an issue with the request itself. |
Beta Was this translation helpful? Give feedback.
-
|
This appears to be an authorization/state mismatch, not just a UI issue. From your description, likely causes are: The thread is already marked as resolved in the backend, but the side-panel still shows it as unresolved (state sync issue). You don’t have permission to resolve the thread (e.g., not the PR author or lacking write access), which explains the 401 – “User is not authorized to resolve the conversation.” The PR was force-pushed, and the original commit range no longer exists, causing: “Jump to comment in diff” → commit range not found Threads still visible in the Conversation tab but detached from the current diff. Suggested improvements: Show a clearer error message when permission is the actual cause. Sync resolved state correctly between Conversation tab and side-panel. If commit range is gone, redirect to the Conversation view instead of a broken diff link. |
Beta Was this translation helpful? Give feedback.
-
|
The permissions aspect of this was raised ages ago in #8327 🥲 |
Beta Was this translation helpful? Give feedback.
-
|
This is wasting me so much time for a simple, medium-sized PR with some 20 comments. I can't resolve my own comments and therefore don't have a good overview of how much I reviewed. Together with "Only the latest 40 comments are currently being shown. To view the remaining comments, open the comments side panel", which forces me to jump between side panel and code all the time, it's an absolute mess. The error HTTP 401 "User is not authorized to resolve the conversation" is clearly not correct. All comments shown in the side panel must be resolveable. I definitely have write access to the repo, and I'm the comment author. I'm also seeing this without force-pushes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I reviewed a quite large PR with many open threads that fail to show inline, so I opened the comments side-panel.
When trying to resolve a thread (click check mark at top right) I get an error
Network inspector shows a seemingly correct POST request to
resolve_threadwith thethreadidPOST param set but I get a HTTP 401 - Forbidden back withSo a better error would be good if information like that is available.
The actual issue might be cause by either:
Beta Was this translation helpful? Give feedback.
All reactions