Skip to content

fix(keychain): show human-readable message for FailedPrecondition errors#2496

Merged
broody merged 1 commit intomainfrom
fix/failed-precondition-error-message
Mar 18, 2026
Merged

fix(keychain): show human-readable message for FailedPrecondition errors#2496
broody merged 1 commit intomainfrom
fix/failed-precondition-error-message

Conversation

@broody
Copy link
Contributor

@broody broody commented Mar 18, 2026

Summary

  • Extract user-facing message from wrapped Coinbase API errors in the FailedPrecondition gRPC error handler
  • Instead of showing "Service error: FailedPrecondition", displays the human-readable portion (e.g., "The user has reached the lifetime guest onramp transaction count limit (15)")
  • Falls back to the full description if the pattern doesn't match

Test plan

  • Trigger a FailedPrecondition error during Apple checkout (e.g., exceed Coinbase guest transaction limit) and verify the alert shows the readable message
  • Verify other RPC error codes still display correctly

🤖 Generated with Claude Code

Extract the user-facing message from wrapped Coinbase API errors instead
of showing the raw gRPC status code "Service error: FailedPrecondition".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Mar 18, 2026 9:52pm
keychain Ready Ready Preview Mar 18, 2026 9:52pm
keychain-storybook Ready Ready Preview Mar 18, 2026 9:52pm

Request Review

@broody broody merged commit 2276f71 into main Mar 18, 2026
12 checks passed
@broody broody deleted the fix/failed-precondition-error-message branch March 18, 2026 21:52
@claude
Copy link
Contributor

claude bot commented Mar 18, 2026

Claude finished @broody's task —— View job


Documentation Analysis Complete

Tasks:

  • Review the code change in packages/keychain/src/utils/errors.ts
  • Assess if this requires documentation updates
  • Search docs repo for relevant pages if needed
  • Make updates if warranted
  • Commit and push any changes

Change Summary:
The PR adds special handling for FailedPrecondition gRPC errors to extract human-readable messages from wrapped Coinbase API errors. Instead of showing "Service error: FailedPrecondition", users now see the actual error message (e.g., "The user has reached the lifetime guest onramp transaction count limit (15)").

Documentation Decision: No updates needed

This change is an internal implementation improvement that enhances the quality of error messages but does not warrant documentation updates because:

  1. No API changes: The error handling behavior remains the same; only the message formatting improves
  2. No new features: This refines existing functionality rather than introducing new capabilities
  3. No user action required: Users don't need to configure anything or change how they use the SDK
  4. Already documented: The existing Coinbase Onramp documentation already covers error handling conceptually at the appropriate level

The error message improvement makes the existing error handling better for end users, but it's an implementation detail rather than a user-facing feature change that requires documentation.

Following the directive to "DEFAULT TO NO CHANGES" - internal refactors and quality improvements do not require documentation updates unless they change APIs, configurations, or user-facing behavior in ways that users need to understand or act upon.


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.

1 participant