Skip to content

fix: clarify id: prefix requirement in error messages#49

Merged
gnapse merged 1 commit intomainfrom
ernesto/improve-id-prefix-error
Feb 9, 2026
Merged

fix: clarify id: prefix requirement in error messages#49
gnapse merged 1 commit intomainfrom
ernesto/improve-id-prefix-error

Conversation

@gnapse
Copy link
Collaborator

@gnapse gnapse commented Feb 9, 2026

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.

  • Added looksLikeRawId() heuristic to detect strings that look like IDs
  • Injected prefix hints into all "not found" error paths
  • Tests verify hint appears only for ID-like strings

🤖 Generated with Claude Code

Copy link

@doist-bot doist-bot bot left a comment

Choose a reason for hiding this comment

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

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.

@gnapse gnapse force-pushed the ernesto/improve-id-prefix-error branch from de3dc6e to dc03d0c Compare February 9, 2026 14:38
@gnapse gnapse changed the title improve: clarify id: prefix requirement in error messages fix: clarify id: prefix requirement in error messages Feb 9, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnapse gnapse force-pushed the ernesto/improve-id-prefix-error branch from dc03d0c to 20191fe Compare February 9, 2026 14:39
@gnapse gnapse added the 👀 Show PR PR must be reviewed before or after merging label Feb 9, 2026
@gnapse gnapse self-assigned this Feb 9, 2026
@gnapse gnapse requested a review from scottlovegrove February 9, 2026 14:40
@gnapse gnapse merged commit 317a20a into main Feb 9, 2026
3 checks passed
@gnapse gnapse deleted the ernesto/improve-id-prefix-error branch February 9, 2026 14:41
Copy link
Collaborator

@scottlovegrove scottlovegrove left a comment

Choose a reason for hiding this comment

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

👍🏻

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

Labels

👀 Show PR PR must be reviewed before or after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments