Skip to content

Clarify error message for private Phabricator revisions#6138

Open
padenot wants to merge 1 commit into
mozilla:masterfrom
padenot:fix-issue-5992-private-revision-error
Open

Clarify error message for private Phabricator revisions#6138
padenot wants to merge 1 commit into
mozilla:masterfrom
padenot:fix-issue-5992-private-revision-error

Conversation

@padenot

@padenot padenot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Previously, attempting to access a private revision would surface a confusing internal error. Now it raises a ToolError with an explicit message explaining the revision is private or not found.

I'm not entirely certain that it's that useful to distinguish, because our token isn't capable of seeing all revisions, but maybe that will change in the future, and feels right anyway.

Fixes #5992

Previously, attempting to access a private revision would surface a
confusing internal error. Now it raises a ToolError with an explicit
message explaining the revision is private or not found.

Fixes mozilla#5992
patch = SanitizedPhabricatorPatch(revision_id=revision_id)
if not patch.is_public():
raise ToolError(
f"Revision D{revision_id} is private and cannot be accessed."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won’t work since we will always get PhabricatorRevisionNotFoundException on secure revisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify the MCP error message when requesting access to private revision

2 participants