{"record":{"id":"9264f98cb97f0b1b","repo":"pentaho/pentaho-kettle","slug":"rest-error-methodmissing","errorCode":"Rest.Error.MethodMissing","errorMessage":"Rest.Error.MethodMissing","messagePattern":"Rest\\.Error\\.MethodMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/rest/core/src/main/java/org/pentaho/di/trans/steps/rest/Rest.java","lineNumber":97,"sourceCode":"    try ( Client client = getClient( rowData ) ) {\n      WebTarget target = buildRequest( client, rowData );\n      return invokeRequest( target, rowData );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"Rest.Error.CanNotReadURL\", data.realUrl ), e );\n    }\n  }\n\n  protected Client getClient( Object[] rowData ) throws KettleException {\n    // get dynamic url ?\n    if ( meta.isUrlInField() ) {\n      data.realUrl = data.inputRowMeta.getString( rowData, data.indexOfUrlField );\n    }\n\n    // get dynamic method?\n    if ( meta.isDynamicMethod() ) {\n      data.method = data.inputRowMeta.getString( rowData, data.indexOfMethod );\n      if ( Utils.isEmpty( data.method ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"Rest.Error.MethodMissing\" ) );\n      }\n    }\n\n    if ( isDetailed() ) {\n      logDetailed( BaseMessages.getString( PKG, \"Rest.Log.ConnectingToURL\", data.realUrl ) );\n    }\n\n    // Register a custom StringMessageBodyWriter to solve PDI-17423\n    ClientBuilder clientBuilder = ClientBuilder.newBuilder();\n    clientBuilder.withConfig( data.config ).property( HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true );\n\n    if ( meta.isIgnoreSsl() || !Utils.isEmpty( data.trustStoreFile ) ) {\n      clientBuilder.sslContext( data.sslContext );\n      clientBuilder.hostnameVerifier( ( s1, s2 ) -> true );\n    }\n\n    Client client = clientBuilder.build();\n    if ( data.basicAuthentication != null ) {","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/rest/core/src/main/java/org/pentaho/di/trans/steps/rest/Rest.java#L79-L115","documentation":"When the REST step is configured with a dynamic method (HTTP verb read from an input field), getClient reads that field and throws a KettleException with Rest.Error.MethodMissing if the value is null or empty. The step cannot execute a request without an HTTP method.","triggerScenarios":"Transformations with 'Dynamic method' enabled where the method field in the incoming row is empty or null for a given row.","commonSituations":"Upstream step failed to populate the method column; rows from heterogeneous sources where some rows lack a method; user selected the wrong field index in the step dialog.","solutions":["Fix the upstream step so every row has a non-empty method value (GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH)","Add a Filter/Stream Lookup step to route rows with empty method values away from the REST step","Check the step dialog's method-field selection points at the correct input column","Default the method upstream: replace empty values with a sensible verb via 'If field value is null' / Value Mapper"],"exampleFix":"// before\nString method = row[methodIdx]; // may be empty\n// after\nString method = row[methodIdx] == null || row[methodIdx].isEmpty() ? \"GET\" : row[methodIdx];","handlingStrategy":"validation","validationCode":"if ( meta.isDynamicMethod() ) {\n  String method = data.inputRowMeta.getString( rowData, data.indexOfMethod );\n  if ( method == null || method.trim().isEmpty() ) {\n    throw new KettleException( \"Row has empty HTTP method in field: \" + data.indexOfMethod );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  Object[] out = step.callRest( row );\n} catch ( KettleException e ) {\n  if ( e.getMessage() != null && e.getMessage().contains( \"MethodMissing\" ) ) {\n    log.error( \"HTTP method field is empty for row — check upstream step\", e );\n  }\n}","preventionTips":["Guarantee the method column is populated for every row (use a default via Value Mapper or If-null step)","Preview the transformation to confirm the method field index selected in the dialog is correct","Filter out or dead-letter rows lacking a method before the REST step","Avoid whitespace-only values — trim the field upstream"],"tags":["kettle","http","validation"],"backgroundTag":"empty-required-field","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"}