Skip to content

[test-build] Handler.call_action wraps peer errors twice #58

@huanghuoguoguo

Description

@huanghuoguoguo

Background

While building the SDK test-build coverage branch, a runtime IO test found that Handler.call_action() wraps peer error responses in a second ActionCallError.

Reproducer

When a peer response has code != 0 and message == 'peer failed', call_action() first raises:

ActionCallError('peer failed')

but the broad except Exception immediately catches it and raises another error:

ActionCallError('ActionCallError: peer failed')

Expected

The caller should receive the peer error message without an extra exception-class prefix, or the method should preserve the original ActionCallError.

Risk

  • Callers cannot reliably match peer error messages.
  • Error strings become noisy and inconsistent with timeout / transport errors.
  • API users may need brittle string parsing.

Test Signal

Locked in test-build as an xfail(strict=True) contract test:

tests/runtime/io/test_handler.py::test_call_action_error_response_should_preserve_peer_message

No source fix is included in the test-build branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions