Skip to content

feat: add BME-specific chain error handling #2712

@baktun14

Description

@baktun14

Context

Part of AEP-76 BME migration. The BME module introduces new chain errors related to circuit breakers and collateral ratio. Console needs to handle these gracefully.

Tasks

  • Update apps/api/src/billing/services/chain-error/chain-error.service.ts:
    • Add error mappings:
      • "mint halted" → HTTP 503, "ACT minting temporarily paused due to market conditions"
      • "insufficient collateral" → HTTP 503, "ACT minting temporarily unavailable"
      • "refund halted" → HTTP 503, "ACT refunds temporarily paused"
    • Update parseInsufficientFundsErrorMessage to recognize uact denom
    • Add uact to any denom-specific error formatting

Acceptance Criteria

  • BME circuit breaker errors return user-friendly messages with appropriate HTTP codes
  • Insufficient funds errors correctly parse uact amounts
  • Existing error handling for uakt/uusdc is unaffected

Milestone

AEP-76: BME Migration — Phase 5 (Error Handling)

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions