Skip to content

[CONTRACT] Implement Error Handling Module #213

@truthixify

Description

@truthixify

Description:
Centralize error handling in errors.rs with a custom Error enum for ManageHub contracts.

Tasks:

  • Create src/errors.rs with Error enum including:
    • SubscriptionAlreadyExists
    • InvalidPayment
    • UserNotFound
    • Unauthorized
    • LogAlreadyExists
    • TokenAlreadyIssued
  • Use #[contracttype] for the enum.
  • Document each error.
  • Export for other modules.
  • Include in lib.rs.
  • Test with a dummy function.

Acceptance Criteria:

  • errors.rs defines Error enum with #[contracttype].
  • Errors are documented and exported.
  • Module compiles.
  • Test verifies error return.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions