Skip to content

feat: docs: document contract error codes with human-readable descriptions#804

Merged
hman38705 merged 1 commit into
solutions-plug:mainfrom
Happybello365:feat/document-error-codes
May 30, 2026
Merged

feat: docs: document contract error codes with human-readable descriptions#804
hman38705 merged 1 commit into
solutions-plug:mainfrom
Happybello365:feat/document-error-codes

Conversation

@Happybello365
Copy link
Copy Markdown

  • Add doc comments to every ErrorCode variant in errors.rs explaining when each error is returned
  • Add docs/CONTRACT_ERRORS.md with full error reference table grouped by category (authorization, market lifecycle, betting, resolution, voting, upgrades, system)
  • Update API_SPEC.md with a Contract Error Codes section and quick- reference table showing how contract errors are surfaced via the API
  • Add CONTRACT_ERROR_MESSAGES map and getContractErrorMessage() helper to frontend/src/lib/api/client.ts so the frontend can map numeric contract error codes to localized user-facing messages

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation update
  • CI / tooling change
  • Breaking change

Testing Done

Checklist

  • Tests pass locally
  • Documentation updated (if applicable)
  • No breaking changes, or breaking changes are documented above

Related Issues

Closes #702

- Add doc comments to every ErrorCode variant in errors.rs explaining
  when each error is returned
- Add docs/CONTRACT_ERRORS.md with full error reference table grouped
  by category (authorization, market lifecycle, betting, resolution,
  voting, upgrades, system)
- Update API_SPEC.md with a Contract Error Codes section and quick-
  reference table showing how contract errors are surfaced via the API
- Add CONTRACT_ERROR_MESSAGES map and getContractErrorMessage() helper
  to frontend/src/lib/api/client.ts so the frontend can map numeric
  contract error codes to localized user-facing messages
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Happybello365 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@hman38705 hman38705 merged commit c630d2c into solutions-plug:main May 30, 2026
13 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

errors.rs error codes are not documented with human-readable descriptions

2 participants