code: func (s *Server) checkSecretExistence(tx store.Tx, spec *api.ServiceSpec) error {
  	container := spec.Task.GetContainer()
  	if container == nil {
  		return nil
  	}
  
  	var failedSecrets []string
  	for _, secretRef := range container.Secrets {
  		secret := store.GetSecret(tx, secretRef.SecretID)
  		// Check to see if the secret exists and secretRef.SecretName matches the actual secretName
  		if secret == nil || secret.Spec.Annotations.Name != secretRef.SecretName {
  			failedSecrets = append(failedSecrets, secretRef.SecretName)
  		}
  	}
  
  	if len(failedSecrets) > 0 {
  		secretStr := "secrets"
  		if len(failedSecrets) == 1 {
  			secretStr = "secret"
  		}
  
  		return status.Errorf(codes.InvalidArgument, "%s not found: %v", secretStr, strings.Join(failedSecrets, ", "))
  
  	}
  
  	return nil
  }
docs: // checkSecretExistence finds if the secret exists