{"record":{"id":"2d669322189926e7","repo":"theonedev/onedev","slug":"param-not-found-s","errorCode":null,"errorMessage":"Param not found: %s","messagePattern":"Param not found: (.+?)","errorType":"validation","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/buildspec/param/instance/PassthroughValue.java","lineNumber":56,"sourceCode":"\n\t@SuppressWarnings(\"unused\")\n\tprivate static List<String> getParamChoices() {\n\t\tList<ParamSpec> paramSpecs = ParamSpec.list();\n\t\tif (paramSpecs != null) \n\t\t\treturn paramSpecs.stream().map(it->it.getName()).collect(Collectors.toList());\n\t\telse\n\t\t\treturn new ArrayList<>();\n\t}\n\t\n\t@Override\n\tpublic List<String> getValue(Build build, ParamCombination paramCombination) {\n\t\tif (paramCombination != null) {\n\t\t\tInput param = paramCombination.getParamInputs().get(paramName);\n\t\t\tif (param != null) {\n\t\t\t\treturn param.getValues();\n\t\t\t} else {\n\t\t\t\tString message = String.format(\"Param not found: %s\", paramName);\n\t\t\t\tthrow new ExplicitException(message);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t}\n\n\t@Override\n\tpublic boolean equals(Object other) {\n\t\tif (!(other instanceof PassthroughValue)) \n\t\t\treturn false;\n\t\tif (this == other)\n\t\t\treturn true;\n\t\tPassthroughValue otherPassthroughValues = (PassthroughValue) other;\n\t\treturn new EqualsBuilder()\n\t\t\t.append(paramName, otherPassthroughValues.paramName)\n\t\t\t.isEquals();\n\t}\n","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/buildspec/param/instance/PassthroughValue.java#L38-L74","documentation":"PassthroughValue.getValue looks up the named parameter in the current param combination's inputs; if the parameter name is absent it throws an ExplicitException 'Param not found: <name>'. This value provider can only resolve params that exist in the job dependency's param combination being passed through.","triggerScenarios":"Calling getValue when paramCombination is non-null but paramCombination.getParamInputs().get(paramName) returns null — i.e. the referenced param does not exist in the upstream job's inputs.","commonSituations":"A dependent job's param uses passthrough value for a param name that was renamed or removed in the parent job; typo in the param name; parent job no longer defines that input.","solutions":["Ensure the referenced param name matches an input defined in the parent job's param combination","Update the dependent job's PassthroughValue after renaming params upstream","Guard with a null/contains check on paramCombination.getParamInputs() when names are dynamic"],"exampleFix":"// before\nnew PassthroughValue(\"buildVersion\") // parent job has 'version'\n// after\nnew PassthroughValue(\"version\")","handlingStrategy":"try-catch","validationCode":"if (paramCombination != null && !paramCombination.getParamInputs().containsKey(paramName))\n    throw new IllegalStateException(\"param not present in parent combination: \" + paramName);","typeGuard":"if (paramCombination != null && paramCombination.getParamInputs().get(paramName) != null) {\n    // safe to read values\n}","tryCatchPattern":"try { return passthroughValue.getValue(paramCombination, paramName); } catch (ExplicitException e) { /* fall back to default value or fail with clear message */ }","preventionTips":["Keep dependent job passthrough param names in sync with parent job inputs","Grep buildspecs for PassthroughValue usages when renaming parent params","Prefer explicit param lists over dynamic names where possible"],"tags":["params","passthrough","buildspec"],"backgroundTag":"record-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}