code: func (scf *SystemChainFilter) Apply(env *cb.Envelope) error {
  	msgData := &cb.Payload{}
  
  	err := proto.Unmarshal(env.Payload, msgData)
  	if err != nil {
  		return errors.Errorf("bad payload: %s", err)
  	}
  
  	if msgData.Header == nil {
  		return errors.Errorf("missing payload header")
  	}
  
  	chdr, err := utils.UnmarshalChannelHeader(msgData.Header.ChannelHeader)
  	if err != nil {
  		return errors.Errorf("bad channel header: %s", err)
  	}
  
  	if chdr.Type != int32(cb.HeaderType_ORDERER_TRANSACTION) {
  		return nil
  	}
  
  	ordererConfig, ok := scf.support.OrdererConfig()
  	if !ok {
  		logger.Panicf("System channel does not have orderer config")
  	}
  
  	maxChannels := ordererConfig.MaxChannelsCount()
  	if maxChannels > 0 {
  		// We check for strictly greater than to accommodate the system channel
  		if uint64(scf.cc.ChannelsCount()) > maxChannels {
  			return errors.Errorf("channel creation would exceed maximimum number of channels: %d", maxChannels)
  		}
  	}
  
  	configTx := &cb.Envelope{}
  	err = proto.Unmarshal(msgData.Data, configTx)
  	if err != nil {
  		return errors.Errorf("payload data error unmarshaling to envelope: %s", err)
  	}
  
  	return scf.authorizeAndInspect(configTx)
  }
docs: // Apply rejects bad messages with an error.