Skip to content

Prevent partial VEA epoch details after indexer request failures #514

Description

@coderabbitai

Summary

Prevent fetchEpochDetail from returning partial VEA epoch data when an inbox message-page request or an outbox relay-message batch request fails.

Required changes

  • In veashi-scanner/lib/vea/client.ts, distinguish failed gql requests from valid empty message pages and valid empty relay batches.
  • Propagate an indexer failure from fetchEpochDetail when either request type fails. Do not return partial message or relay status data.
  • In veashi-scanner/hooks/useVeaEpoch.ts, handle that failure as a load error.

Rationale

The current behavior can stop message pagination early after a failed inbox request. It can also omit relays after a failed outbox request. The detail view can then display an incorrect bridge state.

Affected areas

  • veashi-scanner/lib/vea/client.ts
  • veashi-scanner/hooks/useVeaEpoch.ts

Acceptance criteria

  • A valid empty message page ends pagination normally.
  • A failed inbox message-page request does not produce partial epoch detail data.
  • A valid empty relay batch remains supported.
  • A failed relay batch does not mark affected messages as pending or unexecuted.
  • useVeaEpoch exposes the indexer failure as a load error.
  • Tests cover failed and valid-empty responses for both request types.

Backlinks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions