OnError

Event triggered when an error occurs, such as a failure to connect or send a message.

Example:

ChatClient.OnError += (errorMessage) =>
{
    Console.WriteLine($"An error occurred: {errorMessage}");
};

Last updated