code: func canRetry(args interface{}, err error) bool {
  	// No leader errors are always safe to retry since no state could have
  	// been changed.
  	if structs.IsErrNoLeader(err) {
  		return true
  	}
  
  	// Reads are safe to retry for stream errors, such as if a server was
  	// being shut down.
  	info, ok := args.(structs.RPCInfo)
  	if ok && info.IsRead() && lib.IsErrEOF(err) {
  		return true
  	}
  
  	return false
  }
docs: // canRetry returns true if the given situation is safe for a retry.