{"record":{"id":"7571e8142e228c79","repo":"actualbudget/actual","slug":"no-fields-to-update-use-name-to-specify-a-new-n","errorCode":null,"errorMessage":"No fields to update. Use --name to specify a new name.","messagePattern":"No fields to update\\. Use --name to specify a new name\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/payees.ts","lineNumber":64,"sourceCode":"      await withConnection(\n        opts,\n        async () => {\n          const id = await api.createPayee({ name: cmdOpts.name });\n          printOutput({ id }, opts.format);\n        },\n        { mutates: true },\n      );\n    });\n\n  payees\n    .command('update <id>')\n    .description('Update a payee')\n    .option('--name <name>', 'New payee name')\n    .action(async (id: string, cmdOpts) => {\n      const fields: Record<string, unknown> = {};\n      if (cmdOpts.name) fields.name = cmdOpts.name;\n      if (Object.keys(fields).length === 0) {\n        throw new Error(\n          'No fields to update. Use --name to specify a new name.',\n        );\n      }\n      const opts = program.opts();\n      await withConnection(\n        opts,\n        async () => {\n          await api.updatePayee(id, fields);\n          printOutput({ success: true, id }, opts.format);\n        },\n        { mutates: true },\n      );\n    });\n\n  payees\n    .command('delete <id>')\n    .description('Delete a payee')\n    .action(async (id: string) => {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/cli/src/commands/payees.ts#L46-L82","documentation":"The `payees update <id>` command in the Actual CLI requires at least one field to change. It builds a `fields` object from options (currently only `--name`), and if no options were supplied there is nothing to send to the API, so the command throws this error instead of issuing an empty update.","triggerScenarios":"Running `actual-cli payees update <id>` without any of the supported field flags (e.g. missing `--name`), or passing flags whose values are empty/falsy so they are not added to `fields`.","commonSituations":"Scripting bulk payee renames where one invocation forgot the `--name` flag; renaming payees interactively and typing only the ID; a CI script templating `--name` with an empty variable so the flag value is an empty string.","solutions":["Add the `--name <newname>` option to the payees update command.","If scripting, verify the variable holding the new name is non-empty before invoking the CLI.","If you only wanted to look up a payee, use the `payees get`/`list` command instead of `update`."],"exampleFix":"// before\n$ actual-cli payees update 8f2c...\n// after\n$ actual-cli payees update 8f2c... --name \"Grocery Store\"","handlingStrategy":"validation","validationCode":"if (!name || name.trim() === '') {\n  throw new Error('payees update requires a non-empty --name');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await cli(['payees', 'update', id, '--name', name]);\n} catch (e) {\n  if (e.message.includes('No fields to update')) {\n    console.error('Provide --name when updating a payee');\n  }\n}","preventionTips":["Always pass --name (or another field flag) with payees update.","In scripts, assert the new-name variable is non-empty before invoking the CLI.","Use payees list/get for read-only lookups instead of update."],"tags":["cli","validation","missing-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}