code: func (s *Server) handleFailedMember(member serf.Member) error {
  	// Check if the node exists
  	state := s.fsm.State()
  	_, node, err := state.GetNode(member.Name)
  	if err != nil {
  		return err
  	}
  
  	if node == nil {
  		s.logger.Printf("[INFO] consul: ignoring failed event for member '%s' because it does not exist in the catalog", member.Name)
  		return nil
  	}
  
  	if node.Address == member.Addr.String() {
  		// Check if the serfCheck is in the critical state
  		_, checks, err := state.NodeChecks(nil, member.Name)
  		if err != nil {
  			return err
  		}
  		for _, check := range checks {
  			if check.CheckID == structs.SerfCheckID && check.Status == api.HealthCritical {
  				return nil
  			}
  		}
  	}
  	s.logger.Printf("[INFO] consul: member '%s' failed, marking health critical", member.Name)
  
  	// Register with the catalog
  	req := structs.RegisterRequest{
  		Datacenter: s.config.Datacenter,
  		Node:       member.Name,
  		ID:         types.NodeID(member.Tags["id"]),
  		Address:    member.Addr.String(),
  		Check: &structs.HealthCheck{
  			Node:    member.Name,
  			CheckID: structs.SerfCheckID,
  			Name:    structs.SerfCheckName,
  			Status:  api.HealthCritical,
  			Output:  structs.SerfCheckFailedOutput,
  		},
  
  		// If there's existing information about the node, do not
  		// clobber it.
  		SkipNodeUpdate: true,
  	}
  	_, err = s.raftApply(structs.RegisterRequestType, &req)
  	return err
  }
docs: // handleFailedMember is used to mark the node's status
  // as being critical, along with all checks as unknown.