{"record":{"id":"75e224b14e9776ff","repo":"actualbudget/actual","slug":"unknown-table-table-available-tables-obje","errorCode":null,"errorMessage":"Unknown table \"${table}\". Available tables: ${Object.keys(TABLE_SCHEMA).join(', ')}","messagePattern":"Unknown table \"(.+?)\"\\. Available tables: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/query.ts","lineNumber":347,"sourceCode":"    });\n\n  query\n    .command('tables')\n    .description('List available tables for querying')\n    .action(() => {\n      const opts = program.opts();\n      const tables = Object.keys(TABLE_SCHEMA).map(name => ({ name }));\n      printOutput(tables, opts.format);\n    });\n\n  query\n    .command('fields <table>')\n    .description('List fields for a given table')\n    .action((table: string) => {\n      const opts = program.opts();\n      const schema = TABLE_SCHEMA[table];\n      if (!schema) {\n        throw new Error(\n          `Unknown table \"${table}\". Available tables: ${Object.keys(TABLE_SCHEMA).join(', ')}`,\n        );\n      }\n      const fields = Object.entries(schema).map(([name, info]) => ({\n        name,\n        type: info.type,\n        ...(info.ref ? { ref: info.ref } : {}),\n      }));\n      printOutput(fields, opts.format);\n    });\n}\n","sourceCodeStart":329,"sourceCodeEnd":359,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/cli/src/commands/query.ts#L329-L359","documentation":"The `actual fields <table>` command looks up the requested table in the CLI's built-in TABLE_SCHEMA (transactions, accounts, categories, payees, rules, schedules). If the table name is not one of these keys, it throws with the list of valid tables. The schema is hardcoded in the CLI, so only these tables are known.","triggerScenarios":"`actual fields transaction` (singular instead of plural); `actual fields Transactions` (case-sensitive lookup); `actual fields category_groups` or `actual fields schedules_new` — tables that exist in the underlying data but are absent from the CLI schema.","commonSituations":"Typos and singular/plural confusion; expecting every loot-core table (schedules, category_groups, messages, etc.) to be listed; case-insensitivity assumptions from other CLIs.","solutions":["Use one of the listed tables exactly: transactions, accounts, categories, payees, rules, schedules","Fix case: all table names are lowercase (e.g. `payees`, not `Payees`)","For tables missing from the schema (e.g. category_groups), query them via `actual query <table>` directly against the API or use dotted refs like category.name","File an issue to extend TABLE_SCHEMA if the table should be supported"],"exampleFix":"// before\nactual fields transaction\n\n// after\nactual fields transactions","handlingStrategy":"validation","validationCode":"const KNOWN_TABLES = ['transactions','accounts','categories','payees','rules','schedules'];\nif (!KNOWN_TABLES.includes(table)) {\n  throw new Error(`Table \"${table}\" not supported by 'actual fields'; use one of: ${KNOWN_TABLES.join(', ')}`);\n}","typeGuard":"function isKnownTable(t: string): t is 'transactions'|'accounts'|'categories'|'payees'|'rules'|'schedules' {\n  return ['transactions','accounts','categories','payees','rules','schedules'].includes(t);\n}","tryCatchPattern":"try {\n  const out = await run(['actual', 'fields', table]);\n} catch (e) {\n  if (String(e.message).startsWith('Unknown table')) {\n    console.error(`\"${table}\" is not in the CLI schema; run 'actual fields transactions' to see the format`);\n  } else throw e;\n}","preventionTips":["Run `actual fields <table>` with the plural, lowercase name shown in the error message","Remember the schema is hardcoded: only transactions, accounts, categories, payees, rules, schedules","For other tables, use `actual query <table>` or dotted refs like category.name"],"tags":["cli","invalid-table-name","aql","typo"],"backgroundTag":"unknown-table-name","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}