func remoteIdentityExists(ur user.UserRepo, connectorID, id string) (bool, error) { _, err := ur.GetByRemoteIdentity(nil, user.RemoteIdentity{ ConnectorID: connectorID, ID: id, }) if err == user.ErrorNotFound { return false, nil } if err == nil { return true, nil } return false, err }