DogStark / DogStark/petChain-Frontend

[Frontend] Add Catch and Error State to useBlockchainSync.syncRecord

Open
#583 2 comments 0 reactions 1 assignee Claimed by @Mykelsown View on GitHub
blockchain bug frontend Stellar Wave
Dominant language
TypeScript
Stars
3
Forks
158
Avg merge
3d 6h
Merged PRs (30d)
36

Description

## Description

`src/hooks/useBlockchainSync.ts` (line ~16) has a try block in `syncRecord` with no corresponding catch — an exception during sync propagates uncaught instead of setting an error state the UI can display.

## Current State

- `syncRecord`'s try block has no catch clause

## What Needs to Be Fixed / Built

- Add a catch clause that sets an error state on the hook
- Ensure consumers of this hook (e.g. `BlockchainSyncStatus.tsx`) render that error state

## Acceptance Criteria

- [ ] A failed sync sets a visible error state instead of throwing uncaught
- [ ] Covered by the related `useBlockchainSync` unit test issue

## Files to Modify

- `src/hooks/useBlockchainSync.ts`

## Priority

Medium-High — silent sync failures mean records may never get anchored without anyone noticing

## Estimated Effort

0.5 day

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.