fix: add billing link to insufficient_credit error hint#139
Merged
Conversation
Users hitting insufficient_credit errors had no way to discover where to purchase API credits. The hint now includes a direct link to the API credits settings page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Users hitting
insufficient_crediterrors only saw "Check your credit balance: heygen user me get", with no guidance on where to actually purchase more credits. This adds a direct link to the API credits settings page (https://app.heygen.com/settings?nav=API) so users can resolve the issue without hunting through the HeyGen UI.Discovered via PostHog error analysis:
insufficient_creditonvideo-agent createwas the #1 revenue-blocking error this week (48 distinct installs).Testing
go test ./internal/errors/ -run TestHintForAPICodepasses (test usesContainsassertion, so the appended URL doesn't break it)🤖 Generated with Claude Code