{"record":{"id":"171b707ba17cc8cf","repo":"jackwener/OpenCLI","slug":"no-flomo-memos-matched-the-requested-filters","errorCode":null,"errorMessage":"No Flomo memos matched the requested filters.","messagePattern":"No Flomo memos matched the requested filters\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/flomo/memos.js","lineNumber":215,"sourceCode":"    const slug = parseSlugArg(kwargs.slug);\n    await page.wait(3).catch(() => {});\n    const token = await readAccessToken(page);\n    const body = await fetchFlomoJson(buildSignedUrl(limit, since, slug), token);\n    if (!body || typeof body !== 'object' || Array.isArray(body)) {\n      throw new CommandExecutionError('Flomo API returned a malformed response');\n    }\n    if (body.code !== 0) {\n      const message = body.message || `Flomo API error code ${body.code}`;\n      if (isAuthFailureMessage(message)) {\n        throw new AuthRequiredError(FLOMO_API_DOMAIN, message);\n      }\n      throw new CommandExecutionError(message);\n    }\n    if (!Array.isArray(body.data)) {\n      throw new CommandExecutionError('Flomo API returned malformed memo data');\n    }\n    if (body.data.length === 0) {\n      throw new EmptyResultError('flomo memos', 'No Flomo memos matched the requested filters.');\n    }\n    return body.data.map(normalizeMemo);\n  },\n});\n\nexport const __test__ = {\n  buildSignedUrl,\n  command,\n  normalizeMemo,\n  parsePositiveIntArg,\n  parseSinceArg,\n  parseSlugArg,\n};\n","sourceCodeStart":197,"sourceCodeEnd":229,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/flomo/memos.js#L197-L229","documentation":"clis/flomo/memos.js throws EmptyResultError when the Flomo API responded correctly but zero memos matched the filters supplied to the `flomo memos` command. This is a 'success with no rows' signal, not a failure of the API call itself, so callers can distinguish it from malformed data or auth failures.","triggerScenarios":"`opencli flomo memos` invoked with filter options (search text, tag, date range) that no memo satisfies; the account genuinely has no memos matching the query.","commonSituations":"Typos in tag names or search keywords; filtering by a date range before the account existed; querying a fresh account with no memos; over-restrictive combination of filters.","solutions":["Relax or remove one filter at a time (search term, tag, date range) to find which one excludes everything","Verify exact tag spelling and casing against memos listed without filters","Run `flomo memos` with no filters to confirm the account has data at all"],"exampleFix":"// before\nopencli flomo memos --tag \"worklog\" --from 2020-01-01\n// after\nopencli flomo memos --tag \"work\"   # or drop --from to widen the range","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const memos = await flomoMemos(filters);\n  if (memos.length === 0) {\n    console.warn('No memos matched; check filters');\n  }\n} catch (err) {\n  if (err.name === 'EmptyResultError') {\n    // treat as empty state, not a crash: render empty UI / exit 0 with notice\n  } else {\n    throw err;\n  }\n}","preventionTips":["Validate tag names and keywords against unfiltered output","Start with broad filters, then narrow incrementally","Confirm the account has memos before building filtered queries","Handle EmptyResultError explicitly in scripts so empty sets don't look like crashes"],"tags":["empty-result","filters","flomo"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}