Skip to content

Error describe() helper with actionable fix hints #173

Description

@truthixify

Tier: S (1-2 days) | Type: dx

Context. WraithError today carries a code, a context, and a docsLink, but every fix hint lives in prose on the docs site. Add a describe() method on each concrete error subclass that returns a short "what to try" string derived from context, so console output and error toasts stay useful without a docs round-trip.

Scope.

  • Extend WraithError with an optional describe(): string overrideable per subclass.
  • Implement describe() on every subclass in src/errors.ts (currently 18 classes).
  • Include the docs anchor and 1-2 concrete next steps, templated with this.context.
  • Doc the pattern in docs/errors.md.

Acceptance.

  • Every non-abstract subclass overrides describe() with a hint tailored to its context
  • Unit test asserts describe() returns non-empty for each subclass
  • docs/errors.md shows an example hint
  • No breaking change to existing .message / .toJSON() output

Files. src/errors.ts, test/errors.test.ts, docs/errors.md.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkdxDeveloper experienceerrorsAuto-created for Wave 8help wantedExtra attention is neededstellar-waveAuto-created for Wave 8wave-8Auto-created for Wave 8

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions