Skip to content

Improve error path test coverage #254

@Folyd

Description

@Folyd

Audit and improve test coverage of error handling code paths throughout the SDK.

Tasks

  • Audit all modules for error paths that lack tests
  • Add negative test cases for:
    • Invalid VID formats
    • Cryptographic operation failures
    • Malformed CESR messages
    • Network/transport errors
    • Invalid message signatures
    • Expired or revoked credentials
  • Test boundary conditions (empty inputs, maximum sizes, etc.)
  • Add tests for concurrent error scenarios
  • Document common error testing patterns

Acceptance Criteria

  • All error enum variants have at least one test
  • Coverage of error-returning functions is >90%
  • Edge cases and boundary conditions are tested
  • Documentation includes error testing examples

Modules Needing Attention

  • cesr/ - Decoder error paths
  • crypto/ - Signature/encryption failures
  • vid/ - VID verification failures
  • transport/ - Network error handling
  • store.rs - Database/storage errors

Priority

High - Critical for security and reliability

Part of #245

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