describeMediaSocketError function
User-facing text for any connection error; fallback for errors that are not MediaSocketConnectException.
Implementation
String describeMediaSocketError(Object? error,
{String fallback =
'Unable to connect. Check your credentials and try again.'}) =>
error is MediaSocketConnectException ? error.userMessage : fallback;