{"record":{"id":"d6165f00f0f9f4c1","repo":"jackwener/OpenCLI","slug":"geogebra-info-objname-object-objname-n","errorCode":null,"errorMessage":"`geogebra info ${objName}`, `Object \"${objName}\" not found on the canvas.`","messagePattern":"`geogebra info (.+?)`, `Object \"(.+?)\" not found on the canvas\\.`","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/geogebra/info.js","lineNumber":51,"sourceCode":"            return { error: err?.message || String(err) };\n          }\n        })\n        (${JSON.stringify(objName)})\n      `));\n    } catch (err) {\n      throw new CommandExecutionError(`Failed to inspect GeoGebra object: ${err?.message || err}`);\n    }\n    if (!exists || typeof exists !== 'object' || Array.isArray(exists)) {\n      throw new CommandExecutionError('GeoGebra object existence probe returned malformed result');\n    }\n    if (exists.error) {\n      throw new CommandExecutionError(`Failed to inspect GeoGebra object: ${exists.error}`);\n    }\n    if (exists.ok !== true || typeof exists.exists !== 'boolean') {\n      throw new CommandExecutionError('GeoGebra object existence probe returned malformed result');\n    }\n    if (exists.exists === false) {\n      throw new EmptyResultError(`geogebra info ${objName}`, `Object \"${objName}\" not found on the canvas.`);\n    }\n\n    const properties = ['type', 'value', 'definition', 'command', 'caption', 'visible', 'color'];\n    const rows = [];\n    for (const prop of properties) {\n      const val = await ggbGetProperty(page, objName, prop);\n      rows.push({ property: prop, value: String(val ?? '') });\n    }\n\n    // For point-like objects, also include coordinates\n    const objType = await ggbGetProperty(page, objName, 'type');\n    if (objType === 'point') {\n      const x = await ggbGetProperty(page, objName, 'xcoord');\n      const y = await ggbGetProperty(page, objName, 'ycoord');\n      rows.push({ property: 'x', value: String(x ?? '') });\n      rows.push({ property: 'y', value: String(y ?? '') });\n    }\n","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/geogebra/info.js#L33-L69","documentation":"An EmptyResultError (not a failure): the existence probe ran successfully and reported that no GeoGebra object with the given label exists on the canvas. The command's context string is `geogebra info <name>` and the human message names the missing object. This is the library's way of returning 'not found' as a distinct, catchable outcome.","triggerScenarios":"`geogebra info --name B` when B was never created, was deleted (Delete/B command), the wrong session/tab is bound, or the label is case-mismatched (b vs B).","commonSituations":"Querying an object before running the eval that creates it; a fresh blank session on a new run (no persistence between runs); typo in the label; object removed by a ResetConstruction.","solutions":["Create the object first, e.g. opencli geogebra eval --code 'B=(2,3)', then run info","Verify the exact label with `geogebra list` and match case (GeoGebra labels are case-sensitive)","Re-create the object if the session restarted — fresh runs start blank","Ensure the bound tab is the one containing your construction"],"exampleFix":"// before\nopencli geogebra info --name B   # B does not exist\n// after\nopencli geogebra eval --code 'B=(2,3)'\nopencli geogebra info --name B","handlingStrategy":"try-catch","validationCode":"// pre-check existence via list\nconst out = await run('geogebra', 'list');\nif (!out.split('\\n').some(l => l.startsWith('A,'))) {\n  throw new Error('Object A not on canvas — create it first');\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await run('geogebra', 'info', '--name', 'A');\n} catch (err) {\n  if (/not found on the canvas/.test(err.message)) {\n    await run('geogebra', 'eval', '--code', 'A=(1,2)');\n    return run('geogebra', 'info', '--name', 'A');\n  }\n  throw err;\n}","preventionTips":["Create objects before querying; sessions do not persist between runs","Verify exact label spelling and case with `geogebra list`","Remember GeoGebra labels are case-sensitive (b ≠ B)"],"tags":["geogebra","not-found","empty-result"],"backgroundTag":"geogebra-object-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}