{"record":{"id":"e34b738f7bc309b2","repo":"jenkinsci/jenkins","slug":"not-sure-what-you-meant-by-s","errorCode":null,"errorMessage":"Not sure what you meant by \"%s\".","messagePattern":"Not sure what you meant by \"(.+?)\"\\.","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":"In `ConsoleCommand.run()`, when BUILD is non-numeric AND is not a known permalink AND `job.getPermalinks().findNearest(build)` returns null (no close match), IllegalArgumentException 'Not sure what you meant by \"<build>\".' is thrown (chained with the NumberFormatException). The BUILD argument is entirely unrecognizable.","triggerScenarios":"Running `java -jar jenkins-cli.jar console <job> <token>` where token is neither a number, nor a registered permalink, nor close enough to one to suggest — e.g. a random string like 'foo'.","commonSituations":"Passing a garbage value, wrong field, or a permalink name from a plugin that isn't registered on this job.","solutions":["Pass a valid integer build number or a built-in permalink: lastBuild, lastStableBuild, lastSuccessfulBuild, lastFailedBuild.","Omit the BUILD argument entirely to default to lastBuild.","Inspect `job.getPermalinks()` (or the job's permalink action) to see which permalink IDs are valid for this job."],"exampleFix":"// before: unrecognized token\n//   java -jar jenkins-cli.jar console myjob foo\n//   -> IllegalArgumentException: Not sure what you meant by \"foo\".\n//\n// after: use a valid build number or permalink\n//   java -jar jenkins-cli.jar console myjob lastBuild","handlingStrategy":"validation","validationCode":"// Accept only a number or a registered permalink ID before calling the CLI/console API\nboolean isNumber = buildArg.matches(\"\\\\d+\");\nboolean isPermalink = job.getPermalinks().stream()\n        .anyMatch(pl -> pl.getId().equals(buildArg));\nif (!isNumber && !isPermalink) {\n    throw new IllegalArgumentException(\n        \"BUILD must be a number or one of: \"\n          + job.getPermalinks().stream().map(Permalink::getId).collect(joining(\", \")));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict the BUILD argument to known permalinks (lastBuild, lastStableBuild, lastSuccessfulBuild, lastFailedBuild) or integers.","Omit the argument to default to lastBuild."],"tags":["jenkins","cli","console","permalink","argument"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}