{"record":{"id":"57181d0fd30ac630","repo":"jenkinsci/jenkins","slug":"not-sure-what-you-meant-by-s-did-you-mean-s","errorCode":null,"errorMessage":"Not sure what you meant by \"%s\". Did you mean \"%s\"?","messagePattern":"Not sure what you meant by \"(.+?)\"\\. Did you mean \"(.+?)\"\\?","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/ConsoleCommand.java","lineNumber":62,"sourceCode":"        job.checkPermission(Item.READ);\n\n        Run<?, ?> run;\n\n        try {\n            int n = Integer.parseInt(build);\n            run = job.getBuildByNumber(n);\n            if (run == null)\n                throw new IllegalArgumentException(\"No such build #\" + n);\n        } catch (NumberFormatException e) {\n            // maybe a permalink?\n            Permalink p = job.getPermalinks().get(build);\n            if (p != null) {\n                run = p.resolve(job);\n                if (run == null)\n                    throw new IllegalStateException(\"Permalink \" + build + \" produced no build\", e);\n            } else {\n                Permalink nearest = job.getPermalinks().findNearest(build);\n                throw new IllegalArgumentException(nearest == null ?\n                        String.format(\"Not sure what you meant by \\\"%s\\\".\", build) :\n                        String.format(\"Not sure what you meant by \\\"%s\\\". Did you mean \\\"%s\\\"?\",\n                                build, nearest.getId()), e);\n            }\n        }\n\n        OutputStreamWriter w = new OutputStreamWriter(stdout, getClientCharset());\n        try {\n            long pos = n >= 0 ? seek(run) : 0;\n\n            if (follow) {\n                AnnotatedLargeText logText;\n                do {\n                    logText = run.getLogText();\n                    pos = logText.writeLogTo(pos, w);\n                    // TODO should sleep as in Run.writeWholeLogTo\n                } while (!logText.isComplete());\n            } else {","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/ConsoleCommand.java#L44-L80","documentation":"Same ConsoleCommand branch as error 88, but `findNearest(build)` returned a non-null suggestion, so the message includes 'Did you mean \"<nearest>\"?'. This means the token was a near-miss of a real permalink ID (edit-distance match), guiding the user to the correct spelling.","triggerScenarios":"Running `console <job> <typo>` where the typo is close to a registered permalink, e.g. 'lastBuilds' (extra s), 'lastSucessfulBuild' (missing c), or 'lastStableBuilds'.","commonSituations":"Minor misspelling of a standard permalink; casing differences; pluralizing a permalink name.","solutions":["Use the suggested permalink exactly as printed (the 'Did you mean' hint).","Use a numeric build number to avoid permalink spelling entirely.","Default to lastBuild by omitting the argument."],"exampleFix":"// before:\n//   java -jar jenkins-cli.jar console myjob lastBuilds\n//   -> Not sure what you meant by \"lastBuilds\". Did you mean \"lastBuild\"?\n//\n// after: use the suggested permalink\n//   java -jar jenkins-cli.jar console myjob lastBuild","handlingStrategy":"validation","validationCode":"// Surface the nearest permalink suggestion before the CLI rejects the token\nPermalink nearest = job.getPermalinks().findNearest(buildArg);\nif (nearest != null && !isRegisteredPermalink(job, buildArg)) {\n    throw new IllegalArgumentException(\n        \"Unknown build specifier '\" + buildArg + \"'. Did you mean '\" + nearest.getId() + \"'?\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When a permalink is close, use the server's 'Did you mean' hint directly.","Standardize on canonical permalink IDs to avoid typos."],"tags":["jenkins","cli","console","permalink","typo"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}