Skip to content

## [SDK · Network & Horizon] Implement HorizonClient wrapper — accounts endpoint #150

Description

@amina69

Epic: Network & Horizon
Labels: network, types, sdk
Size: S (~1 day)

Description

Wrap the Horizon accounts endpoint with error normalisation.

Tasks

  • getAccount(accountId): fetch account, return raw AccountRecord
  • On 404: throw AccountNotFoundError
  • On 400: throw ValidationError("Invalid account ID")
  • On 5xx: throw HorizonSubmitError with retryable:true
  • On network error/timeout: throw TransactionTimeoutError
  • Log request and response at debug level (no secrets)
  • Unit test: successful fetch, 404, 400, 500

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions