Skip to content

[Bug] MobileFormInput.tsx unhandled promise in useEffect with void operator #795

Description

@RUKAYAT-CODER

Overview

MobileFormInput.tsx calls an async function inside useEffect using the void operator to suppress the TypeScript warning. This discards any rejection from the async call, leaving form initialization errors completely silent.

Specifications

Features:

  • Remove the void suppression
  • Handle the promise properly with a try/catch inside the effect
  • Surface form cache loading errors to the user or log them to Sentry

Tasks:

  • Refactor the effect to use an inner async IIFE with try/catch
  • Add an error state that disables the field with an error message on failure
  • Write a test that mocks the cache call to reject and confirms error state

Impacted Files:

  • src/components/common/MobileFormInput.tsx

Acceptance Criteria

  • Form cache errors are not silently swallowed
  • Field shows an error state if cache load fails
  • Error is logged to Sentry

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions