Error categories
| Category | Cause | Recommended action |
|---|---|---|
| Invalid transaction | Malformed bytes, wrong encoding | Show error, don’t allow signing |
| Wrong chain | Transaction doesn’t match specified chain | Ask user to verify chain selection |
| Unknown contract | No ABI, not a known protocol | Show available info + warning |
| Parse failure | Bug or unsupported feature | Fall back to raw display |
| Service unavailable | Network or service down | Retry or fall back |
gRPC error codes
The parser returns standard gRPC status codes:Error code reference
| Code | Name | Description |
|---|---|---|
3 | INVALID_ARGUMENT | Invalid transaction bytes or encoding |
5 | NOT_FOUND | Chain not supported |
9 | FAILED_PRECONDITION | Chain mismatch or missing required data |
13 | INTERNAL | Parser error |
14 | UNAVAILABLE | Service temporarily unavailable |
Graceful degradation
When parsing fails or returns incomplete data, you can still allow signing with appropriate warnings:User communication
Match error severity to UI treatment:| Scenario | UI Treatment |
|---|---|
| Parsed successfully | Show VisualSign fields normally |
| Unknown contract | Show parsed fields + “Interacting with unverified contract” banner |
| Partial parse | Show what’s known + “Some details unavailable” notice |
| Parse failed entirely | Show raw hex + “Unable to decode transaction” warning |
| Invalid transaction | Error state, disable signing |
| Service unavailable | ”Checking transaction…” with retry option |
Example warning banners
Unknown contract:Retry logic
For transient failures, implement retry with exponential backoff:Health checks
Monitor parser availability before users need it:Logging and monitoring
Track parsing outcomes for debugging and improvement:Next steps
- How Parsing Works — Understand what can cause parse failures
- Chain Metadata — Reduce “unknown contract” errors
- gRPC API Reference — Full error code documentation