{"record":{"id":"f5e6d60b8b6b7ccf","repo":"m1k1o/neko","slug":"cannot-delete-user-in-noauth-mode","errorCode":null,"errorMessage":"cannot delete user in noauth mode","messagePattern":"cannot delete user in noauth mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/member/noauth/provider.go","lineNumber":74,"sourceCode":"\nfunc (provider *MemberProviderCtx) UpdateProfile(id string, profile types.MemberProfile) error {\n\treturn nil\n}\n\nfunc (provider *MemberProviderCtx) UpdatePassword(id string, password string) error {\n\treturn errors.New(\"noauth mode does not have password\")\n}\n\nfunc (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error) {\n\treturn types.MemberProfile{}, errors.New(\"cannot select user in noauth mode\")\n}\n\nfunc (provider *MemberProviderCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {\n\treturn map[string]types.MemberProfile{}, nil\n}\n\nfunc (provider *MemberProviderCtx) Delete(id string) error {\n\treturn errors.New(\"cannot delete user in noauth mode\")\n}\n","sourceCodeStart":56,"sourceCodeEnd":76,"githubUrl":"https://github.com/m1k1o/neko/blob/b0f01cedea68893e85a3fd852c0521238c285695/server/internal/member/noauth/provider.go#L56-L76","documentation":"Returned by MemberProviderCtx.Delete in the noauth member provider when a caller attempts to delete a user by ID. In noauth mode there is no persistent user store, so delete operations are unsupported and always fail with this error.","triggerScenarios":"Any call to the member Delete API (delete-user endpoint) while the member provider is 'noauth'.","commonSituations":"Generic admin tooling attempts to delete a user on a noauth deployment; every call fails because there is no user store in noauth mode.","solutions":["Do not call Delete in noauth mode; there are no users to delete.","Switch to multiuser or another dynamic provider if user lifecycle management is required.","Skip delete operations in client tooling when provider is noauth."],"exampleFix":"// before\nerr := memberClient.Delete(id)\n\n// after\nif memberProvider == \"noauth\" {\n    return errors.New(\"no users exist to delete in noauth mode\")\n}\nerr := memberClient.Delete(id)","handlingStrategy":"validation","validationCode":"if memberProvider == \"noauth\" {\n    return errors.New(\"no users to delete in noauth mode\")\n}\nerr := memberClient.Delete(id)","typeGuard":"func isNoauthUnsupportedErr(err error) bool {\n    return err != nil && strings.Contains(err.Error(), \"in noauth mode\")\n}","tryCatchPattern":"err := memberClient.Delete(id)\nif err != nil {\n    if isNoauthUnsupportedErr(err) {\n        log.Printf(\"noauth mode: nothing to delete: %v\", err)\n    }\n    return err\n}","preventionTips":["Disable delete-user actions on noauth deployments.","Skip member lifecycle APIs entirely for noauth provider.","Switch to a dynamic provider for real user management.","Validate provider type at client startup and configure available operations accordingly."],"tags":["noauth","members","unsupported-operation"],"backgroundTag":"unsupported-operation-mode","analyzedSha":"b0f01cedea68893e85a3fd852c0521238c285695","analyzedAt":"2026-09-01T10:35:56.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}