{"record":{"id":"15639a585166d4e7","repo":"pentaho/pentaho-kettle","slug":"http-exception-couldnotfindfield","errorCode":"HTTP.Exception.CouldnotFindField","errorMessage":"HTTP.Exception.CouldnotFindField","messagePattern":"HTTP\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/http/HTTP.java","lineNumber":83,"sourceCode":"  private static Class<?> PKG = HTTPMeta.class; // for i18n purposes, needed by Translator2!! $NON-NLS-1$\n\n  private HTTPMeta meta;\n  private HTTPData data;\n\n  public HTTP( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans ) {\n    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );\n  }\n\n  private Object[] execHttp( RowMetaInterface rowMeta, Object[] row ) throws KettleException {\n    if ( first ) {\n      first = false;\n      data.argnrs = new int[ meta.getArgumentField().length ];\n\n      for ( int i = 0; i < meta.getArgumentField().length; i++ ) {\n        data.argnrs[ i ] = rowMeta.indexOfValue( meta.getArgumentField()[ i ] );\n        if ( data.argnrs[ i ] < 0 ) {\n          logError( BaseMessages.getString( PKG, \"HTTP.Log.ErrorFindingField\" ) + meta.getArgumentField()[ i ] + \"]\" );\n          throw new KettleStepException( BaseMessages.getString( PKG, \"HTTP.Exception.CouldnotFindField\", meta\n            .getArgumentField()[ i ] ) );\n        }\n      }\n    }\n\n    return callHttpService( rowMeta, row );\n  }\n\n  @VisibleForTesting\n  Object[] callHttpService( RowMetaInterface rowMeta, Object[] rowData ) throws KettleException {\n    HttpClientManager.HttpClientBuilderFacade clientBuilder = HttpClientManager.getInstance().createBuilder();\n\n    if ( data.realConnectionTimeout > -1 ) {\n      clientBuilder.setConnectionTimeout( data.realConnectionTimeout );\n    }\n    if ( data.realSocketTimeout > -1 ) {\n      clientBuilder.setSocketTimeout( data.realSocketTimeout );\n    }","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/http/HTTP.java#L65-L101","documentation":"The HTTP step is configured with argument fields whose names must exist in the incoming row. execHttp resolves each configured argument field via rowMeta.indexOfValue; if a field name is not present in the row, it logs 'ErrorFindingField' and throws this KettleStepException.","triggerScenarios":"execHttp is called (first row processed) and meta.getArgumentField()[i] has no matching column in the input row — indexOfValue returns -1.","commonSituations":"Field renamed or removed by an upstream step; typo in the 'Accept URL from field / argument field' setting; transformation copied between flows with different row layouts; case-sensitive field-name mismatch.","solutions":["Fix the field name in the HTTP step's argument field setting to exactly match an upstream column","Add a Select Values / Field exists check upstream to guarantee the field is produced","Re-run 'Get fields' in the step dialog after upstream changes","Check field-name case — Kettle field names are case-sensitive","Verify the upstream step that produces the field executes before this step"],"exampleFix":"// before (step config)\nargumentField: \"user_id\"   // upstream produces \"userId\"\n// after\nargumentField: \"userId\"","handlingStrategy":"validation","validationCode":"// before executing, verify configured argument fields exist in the row\nRowMetaInterface inputRowMeta = ...; // from upstream preview\nfor ( String argField : httpMeta.getArgumentField() ) {\n  if ( argField != null && inputRowMeta.indexOfValue( argField ) < 0 ) {\n    throw new IllegalArgumentException( \"Missing HTTP argument field: \" + argField );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  transformation.execute( arguments );\n} catch ( KettleStepException e ) {\n  if ( e.getMessage().contains( \"CouldnotFindField\" ) ) {\n    log.error( \"HTTP step argument field missing from input row: {}\", e.getMessage() );\n  } else { throw e; }\n}","preventionTips":["Use 'Get fields' in the HTTP step dialog after any upstream change","Add a Select Values step to pin/normalize field names early","Preview upstream rows to confirm field names before running","Avoid renaming upstream fields without updating consumers"],"tags":["kettle","pdi","http","field-lookup","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}