Skip to content

Bug: Improve error handling for invalid account configuration #206

@8omnipotent8

Description

@8omnipotent8

Describe the bug

When initializing the Account SDK with invalid or incomplete configuration (e.g. missing chain, invalid signer, or unsupported account type), the resulting errors are not always clear or actionable. This makes debugging initial integration harder for developers.

Steps

  1. Install the Account SDK.
  2. Initialize an account with missing or invalid configuration (for example, omit the chain or provide an unsupported signer).
  3. Attempt to create or use the account.
  4. Observe the thrown error or stack trace.

Expected behavior

Expected behavior:

  • SDK validates required account configuration early.
  • Errors clearly state which field is missing or invalid.
  • Error messages suggest how to fix the configuration issue.

Proposed solution:

  • Add validation checks during account initialization.
  • Throw descriptive, user-facing errors instead of generic exceptions.
  • Document required and optional configuration fields with examples.

Acceptance criteria:

  • Invalid configuration fails fast with a clear error.
  • Error message explicitly references the problematic field.
  • Documentation includes a minimal valid account setup example.

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions