{"record":{"id":"a432047bf191179c","repo":"jackwener/OpenCLI","slug":"no-keys-match-flt","errorCode":null,"errorMessage":"No keys match \"${flt}\".","messagePattern":"No keys match \"(.+?)\"\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/kimi/storage.js","lineNumber":59,"sourceCode":"    ],\n    columns: STORAGE_COLUMNS,\n    func: async (page, kwargs) => {\n        await ensureOnKimi(page);\n        const store = pickStore(kwargs);\n        const raw = await page.evaluate(`(() => {\n      const s = ${store};\n      const out = [];\n      for (let i = 0; i < s.length; i++) {\n        const k = s.key(i);\n        const v = s.getItem(k) || '';\n        out.push({ k, bytes: v.length });\n      }\n      return out;\n    })()`);\n        const flt = kwargs?.filter ? String(kwargs.filter).toLowerCase() : null;\n        const filtered = flt ? raw.filter((r) => r.k.toLowerCase().includes(flt)) : raw;\n        if (!filtered.length) {\n            throw new EmptyResultError('kimi storage-keys', flt ? `No keys match \"${flt}\".` : `${store} is empty.`);\n        }\n        filtered.sort((a, b) => a.k.localeCompare(b.k));\n        const limit = Number.isInteger(kwargs?.limit) && kwargs.limit > 0 ? kwargs.limit : 100;\n        return filtered.slice(0, limit).map((r, i) => ({ Index: i + 1, Key: r.k, Bytes: r.bytes }));\n    },\n});\n\n// -------- storage-get --------\ncli({\n    site: 'kimi',\n    name: 'storage-get',\n    access: 'read',\n    description: 'Read a single localStorage / sessionStorage value on kimi.com. Auto-decodes JSON.',\n    domain: KIMI_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/kimi/storage.js#L41-L77","documentation":"EmptyResultError thrown by kimi storage-keys when, after reading all entries from the chosen store and optionally filtering by substring, the result set is empty. The message distinguishes the filtered case ('No keys match \"X\".') from an entirely empty store ('<store> is empty.').","triggerScenarios":"Running `kimi storage keys --filter <substring>` when no key in localStorage/sessionStorage contains that substring (case-insensitive), or running with no filter when the store has zero entries.","commonSituations":"Assuming Kimi stores data under names it doesn't use, filtering with the wrong substring or wrong --storage target (data lives in sessionStorage but you read localStorage), or a fresh profile/browser with no stored keys yet.","solutions":["Run without --filter first to list all keys and confirm what actually exists","Check you targeted the right store (--storage session vs local)","Loosen or correct the filter substring; it is a case-insensitive substring match on key names","Clear your assumption by reading storage-get for a known key to verify the store is the right one"],"exampleFix":"// before\nawait kimi(['storage', 'keys', '--filter', 'kimi_token']);\n// after\nconst all = await kimi(['storage', 'keys']); // inspect actual key names\nconst match = all.find(k => k.Key.includes('token'));\nif (match) await kimi(['storage', 'get', '--key', match.Key]);","handlingStrategy":"fallback","validationCode":"// check the store is non-empty before applying a filter\nconst all = await kimi(['storage', 'keys']);\nif (!all.length) console.warn('store is empty; filter will match nothing');","typeGuard":"const hasMatches = (rows) => Array.isArray(rows) && rows.length > 0;","tryCatchPattern":"try {\n  return await kimi(['storage', 'keys', '--filter', flt]);\n} catch (e) {\n  if (/No keys match/.test(e.message)) {\n    return await kimi(['storage', 'keys']); // fall back to unfiltered listing\n  }\n  throw e;\n}","preventionTips":["List keys unfiltered first to learn actual key names","Confirm local vs session store before filtering","Use short, case-insensitive substrings for filters","Treat empty filter results as data-missing, not a bug"],"tags":["empty-result","filtering","kimi"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}