Skip to content

Adopt @couimet/detailed-result for error handling #687

Description

@couimet

Context

@couimet/detailed-result was just published (PR #93). It provides a DetailedResult<T, E> type for explicit error handling, paired with @couimet/detailed-error.

RangeLink's production source doesn't currently use a Result type, but the demo files (demo/01-basic-usage/paymentHandler.v1.ts, paymentHandler.v2.ts) hand-roll a PaymentResult interface with { success: boolean; ... } — a pattern that DetailedResult standardises.

What to do

  • Add @couimet/detailed-result to dependencies (and @couimet/detailed-error if not already present) in package.json
  • Update the demo payment handlers to return DetailedResult instead of the ad-hoc PaymentResult interface
  • Consider adopting DetailedResult in any production error-handling paths that return success/failure discriminated unions
  • Run pnpm install, pnpm build, pnpm test, and pnpm typecheck to verify

This is lower-priority than the rabbit-maximizer migration — the demo files are educational, and the production code doesn't duplicate a local Result. The issue is primarily to track the opportunity.

Parent: couimet/ts-npm-packages#86

Generated by /create-github-issue v2026.07.10@aa48370 • my-claude-skills

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions