{"record":{"id":"51b18e3a3c337998","repo":"jackwener/OpenCLI","slug":"type-must-be-a-geogebra-object-type-like-point-li","errorCode":null,"errorMessage":"type must be a GeoGebra object type like point, line, or circle","messagePattern":"type must be a GeoGebra object type like point, line, or circle","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"warning","filePath":"clis/geogebra/list.js","lineNumber":23,"sourceCode":"cli({\n  site: 'geogebra',\n  name: 'list',\n  access: 'read',\n  description: 'List all geometric objects on the GeoGebra canvas',\n  domain: 'www.geogebra.org',\n  strategy: Strategy.PUBLIC,\n  browser: true,\n  navigateBefore: false,\n  args: [\n    { name: 'type', required: false, help: 'Filter by object type (e.g. \"point\", \"line\", \"circle\")' },\n  ],\n  columns: ['name', 'type', 'value', 'visible'],\n  func: async (page, kwargs) => {\n    const filterType = kwargs.type == null || kwargs.type === ''\n      ? ''\n      : String(kwargs.type).trim().toLowerCase();\n    if (filterType && !/^[a-z-]+$/.test(filterType)) {\n      throw new ArgumentError('type must be a GeoGebra object type like point, line, or circle');\n    }\n    await ensureApplet(page);\n    const objects = await ggbListObjects(page, filterType);\n    if (!Array.isArray(objects) || objects.length === 0) {\n      throw new EmptyResultError(\n        'geogebra list',\n        'No objects found on the canvas. Fresh runs start a blank session; use one \"eval\" call, or inspect an already-bound tab through the browser workspace commands.',\n      );\n    }\n    return objects;\n  },\n});\n","sourceCodeStart":5,"sourceCodeEnd":36,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/geogebra/list.js#L5-L36","documentation":"An ArgumentError raised by `geogebra list --type <t>` when the type filter contains characters outside [a-z-]. The filter is meant to be a lowercase GeoGebra object type keyword (point, line, circle, segment, conic, etc.); anything else — mixed case, digits, spaces, underscores — is rejected before reaching the applet.","triggerScenarios":"`geogebra list --type 'Point'` (uppercase), `--type 'line segment'` (space), `--type 'poly1'` (digits — that's a label, not a type).","commonSituations":"Users passing an object label instead of a type; capitalizing the type name; trying to filter by name with the --type flag.","solutions":["Use a lowercase type keyword: point, line, circle, segment, conic, polygon, etc.","Lowercase and strip spaces from the value before passing it","If you meant a specific object, use `geogebra info --name <label>` instead of list --type","Omit --type entirely to list all objects and filter client-side"],"exampleFix":"// before\nopencli geogebra list --type \"Point\"\n// after\nopencli geogebra list --type \"point\"","handlingStrategy":"validation","validationCode":"const type = String(process.argv.type ?? '').trim().toLowerCase();\nif (type && !/^[a-z-]+$/.test(type)) {\n  throw new Error(`--type must be a lowercase GeoGebra type like point, line, circle; got \"${type}\"`);\n}","typeGuard":"const isValidTypeFilter = (t) => t == null || t === '' || /^[a-z-]+$/.test(String(t).trim().toLowerCase());","tryCatchPattern":"try {\n  await run('geogebra', 'list', '--type', type);\n} catch (err) {\n  if (/type must be a GeoGebra object type/.test(err.message)) {\n    return run('geogebra', 'list'); // list all, filter client-side\n  }\n  throw err;\n}","preventionTips":["Lowercase type filters before passing them","Never pass object labels to --type; use info --name for labels","When unsure, omit --type and filter the output yourself"],"tags":["geogebra","argument-validation","cli"],"backgroundTag":"invalid-argument-value","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}