class Redis::Client

def translate_error_class(error_class)

def translate_error_class(error_class)
  ERROR_MAPPING.fetch(error_class)
rescue IndexError
  if (client_error = error_class.ancestors.find { |a| ERROR_MAPPING[a] })
    ERROR_MAPPING[error_class] = ERROR_MAPPING[client_error]
  else
    raise
  end
end