Skip to content

Reword "Expected to read N payload bytes" exception message  #1383

Description

@bgrainger

When an incomplete message is received from the server, MySqlConnector throws an exception with the message $"Expected to read {payloadLength:d} payload bytes but only received {payloadBytes.Count:d}.":

The message doesn't clearly identify the cause of the issue, which has historically been the server closing the connection, not a bug in this library.

Change the message to something more generic such as "An incomplete response was received from the server" and log the extra details.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions