Skip to content

Title: Replace unwrap()/expect() calls in core modules with proper error handling #33

Description

@Mkalbani

Description

A code audit shows multiple unwrap()/expect() calls in the session, puzzle, and persistence modules that can cause panics on malformed input or I/O failure instead of returning recoverable errors. Replace these with a consistent Result-based error type.

Acceptance Criteria

  • A crate-wide GameError enum introduced (using thiserror)
  • All unwrap()/expect() in session, puzzle, scoring, and persistence modules replaced with ?-propagated errors, except where panics are truly unreachable and documented as such
  • Public API functions return Result<T, GameError> instead of panicking
  • CLI layer surfaces errors as user-friendly messages instead of a Rust panic backtrace
  • clippy::unwrap_used lint enabled in CI for the affected modules

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions