Skip to content

AbstractClientTransport.checkState builds a broken error message #1083

Description

@devcrocod

AbstractClientTransport.checkState calls check(actualState == expected) { lazyMessage }. That returns the lambda itself instead of lazyMessage(actualState), so the exception text is a function's toString(). Nothing in the SDK calls the method, but it is protected API in the ABI dump, so subclasses can.

Expected: fix the call, or remove the method while the public API is being reviewed (#1038).

Activity

  1. added this to the 0.19.0 milestone on Sep 30, 2026
  2. added theissue type on Sep 30, 2026
  3. added
    bugSomething isn't working
    apiPublic API changes
    P3Nice to haves, rare edge cases
    on Sep 30, 2026
  4. mvanhorn commented on Oct 20, 2026

    @mvanhorn

    AbstractClientTransport.checkState returns lazyMessage itself from the check failure block instead of invoking it with actualState.

    Invoke lazyMessage(actualState) when the state check fails. Add regression tests for the default message, custom message evaluation exactly once with the observed state, skipped evaluation when the state matches, and formatting after a forced state change.

    #1132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to haves, rare edge casesapiPublic API changesbugSomething isn't working

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions