-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
ConnectionMultiplexer currently has a IncludeDetailInExceptions flag with the following description
/// <summary>
/// Should exceptions include identifiable details? (key names, additional .Data annotations)
/// </summary>
public bool IncludeDetailInExceptions { get; set; }
which expected to mean that when IncludeDetailInExceptions=True on multiplexer, it might include command and key, otherwise only command.
Though, it is still possible to receive error messages like below when flag is disabled:
UnableToResolvePhysicalConnection on UNLINK Redis-Key, unable to write batch"
based on code, it may happen due to below logic in ResultProcessor class that doesn't check IncludeDetailInExceptions flag:
public void ConnectionFail(Message message, ConnectionFailureType fail, Exception innerException, string annotation)
{
PhysicalConnection.IdentifyFailureType(innerException, ref fail);
string exMessage = fail.ToString() + (message == null ? "" : (" on " + (
fail == ConnectionFailureType.ProtocolFailure ? message.ToString() : message.CommandAndKey)));
if (!string.IsNullOrWhiteSpace(annotation)) exMessage += ", " + annotation;
var ex = innerException == null ? new RedisConnectionException(fail, exMessage)
: new RedisConnectionException(fail, exMessage, innerException);
SetException(message, ex);
}