code: func (api OrganizationsAPI) RemovePendingInvitation(w http.ResponseWriter, r *http.Request) {
  	globalID := mux.Vars(r)["globalid"]
  	searchString := mux.Vars(r)["searchstring"]
  	invitationMgr := invitations.NewInvitationManager(r)
  
  	usr, err := SearchUser(r, searchString)
  	if err != nil {
  		if db.IsNotFound(err) {
  			log.Debug("Could not find existing user for whom to remove the invitation")
  			usr = &user.User{}
  			// http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  			// return
  		} else {
  			log.Error("Error while searching user: ", err)
  			http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  			return
  		}
  	}
  
  	err = invitationMgr.Remove(globalID, usr.Username, searchString)
  	if err == mgo.ErrNotFound {
  		http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  		return
  	}
  	if err != nil {
  		log.Error("Error while remove invite: ", err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	w.WriteHeader(http.StatusNoContent)
  }
docs: // RemovePendingInvitation is the handler for DELETE /organizations/{globalid}/invitations/{username}
  // Cancel a pending invitation.