Skip to content

Standardize error codes and map them to user-friendly messages in the UI #244

Description

@Aditya8369

Description: The hook sets setError('WORKER_TIMEOUT') and sometimes sets error to arbitrary messages. The UI prints String(error) directly. This makes it hard to provide consistent, actionable feedback.
Files: lib/hooks/useCipherWorker.ts, components/challenge/ChallengeMode.tsx
Proposed enhancement: Define an error shape or error-code union (e.g., WORKER_TIMEOUT, INVALID_INPUT, WORKER_ERROR) and map to localized UI strings/banners (timeout retry suggestion, validation tips, etc.).

Metadata

Metadata

Assignees

Labels

ECSoC26Elite Coders Summer of Code 2026

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions