m1k1o/neko · error · ErrMemberDoesNotExist
member does not exist
Error message
member does not exist
What it means
ErrMemberDoesNotExist is a sentinel error in the neko server's types package indicating that a member (user account) lookup failed because no member with the given id/username exists in the configured member provider (e.g. file or database backend). It is returned by member operations such as Login, ExtractMember, UpdateProfile, UpdatePassword, Delete, and getEntry when the referenced account cannot be found.
Source
Thrown at server/pkg/types/member.go:7
package types
import "errors"
var (
ErrMemberAlreadyExists = errors.New("member already exists")
ErrMemberDoesNotExist = errors.New("member does not exist")
ErrMemberInvalidPassword = errors.New("invalid password")
)
type MemberProfile struct {
Name string `json:"name"`
// permissions
IsAdmin bool `json:"is_admin" mapstructure:"is_admin"`
CanLogin bool `json:"can_login" mapstructure:"can_login"`
CanConnect bool `json:"can_connect" mapstructure:"can_connect"`
CanWatch bool `json:"can_watch" mapstructure:"can_watch"`
CanHost bool `json:"can_host" mapstructure:"can_host"`
CanShareMedia bool `json:"can_share_media" mapstructure:"can_share_media"`
CanAccessClipboard bool `json:"can_access_clipboard" mapstructure:"can_access_clipboard"`
SendsInactiveCursor bool `json:"sends_inactive_cursor" mapstructure:"sends_inactive_cursor"`
CanSeeInactiveCursors bool `json:"can_see_inactive_cursors" mapstructure:"can_see_inactive_cursors"`
// plugin scopeView on GitHub (pinned to b0f01cedea)
Solutions
- Verify the member id/username exists in the configured member provider before calling the API (list members or query the store directly).
- Check that the server's member provider backend (file/database path, connection) points at the data source that actually contains the account.
- Re-create the missing member account with the expected credentials/profile.
- If the member was deleted, invalidate the referencing session and re-authenticate.
- Enable provider logging to confirm which lookup (id vs username) failed.
Example fix
// before
profile, err := memberManager.Select(id) // panics later or fails with ErrMemberDoesNotExist
if err != nil {
return err
}
// after
profile, err := memberManager.Select(id)
if errors.Is(err, types.ErrMemberDoesNotExist) {
return fmt.Errorf("member %q not found, check provider backend", id)
} else if err != nil {
return err
} Defensive patterns
Strategy: type-guard
Validate before calling
// Go: check membership before operating
if _, ok := members[id]; !ok {
return fmt.Errorf("member %q does not exist", id)
} Type guard
func MemberExists(m types.MemberProvider, id string) bool {
_, err := m.Select(id)
return err == nil
} Try / catch
if err != nil {
if errors.Is(err, types.ErrMemberDoesNotExist) {
// handle missing member: create it or return 404
return
}
return err
} Prevention
- Always errors.Is-check sentinel errors instead of comparing strings.
- List members before mutating an unknown id.
- Keep member store and session store in sync (delete sessions when deleting members).
- Seed and back up the member provider data source.
When it happens
Trigger: Calling Login with a username not present in the member store; UpdateProfile, UpdatePassword, or Delete with an unknown/expired member id; ExtractMember resolving a session whose member record was deleted; getEntry when the underlying provider (file/db) has no entry for the requested id.
Common situations: Pointing the server at a fresh/empty member database or a different data directory than expected; deleting a member while their session is still alive; typos in usernames in API calls or config seeds; migration from another auth provider leaving stale member references.
Understand the failure class
Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.
Related errors
- session not found
- invalid password
- session login disabled
- session logins locked
- webrtc data channel not found
AI-assisted analysis of m1k1o/neko@b0f01cedea (2026-09-01).
Data as JSON: /api/errors/b16e2f598fb31cab.
Report an issue: GitHub.