fix: clarify id: prefix requirement in error messages#49
Merged
Conversation
There was a problem hiding this comment.
This PR introduces a helpful clarification to error messages, suggesting the id: prefix when a user appears to have passed a raw ID. Centralizing this check with the new looksLikeRawId() function is a great approach that improves the overall user experience by making errors more actionable. No issues were flagged in the review.
de3dc6e to
dc03d0c
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dc03d0c to
20191fe
Compare
This was referenced Feb 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When users pass raw IDs without the
id:prefix, the error message now includes a helpful hint suggesting the correct format.Centralizes ID detection in
looksLikeRawId()to intelligently distinguish ID-like strings (alphanumeric or numeric) from regular names, applying hints only when appropriate. Errors are clearer for both human users and AI agents.looksLikeRawId()heuristic to detect strings that look like IDs🤖 Generated with Claude Code