in src/MySqlBindingUtilities.cs [256:276]
internal static async Task OpenAsyncWithMySqlErrorHandling(this MySqlConnection connection, CancellationToken cancellationToken)
{
try
{
await connection.OpenAsync(cancellationToken);
}
catch (Exception e)
{
MySqlException mysqlEx = e is AggregateException a ? a.InnerExceptions.OfType<MySqlException>().First() :
e is MySqlException s ? s : null;
// Error number for:
// A connection was successfully established with the server, but then an error occurred during the login process.
// The certificate chain was issued by an authority that is not trusted.
// Add on some more information to help the user figure out how to solve it
if (mysqlEx?.Number == -2146893019)
{
throw new InvalidOperationException("The default values for encryption on connections have been changed, please review your configuration to ensure you have the correct values for your server. See https://aka.ms/afsqlext-connection for more details.", e);
}
throw;
}
}