pentaho/pentaho-kettle · error · KettleException

SalesforceDelete.FailedToDeleted

Error message

SalesforceDelete.FailedToDeleted

What it means

flushBuffers (or the surrounding write path) catches exceptions while deleting records; when the step is not configured for error handling it rethrows as a KettleException with this message and the underlying error text. It means the delete operation itself failed before results could be processed.

Solutions

  1. Inspect the chained cause message for the real Salesforce failure
  2. Configure error handling on the step so failures are captured instead of aborting
  3. Verify connectivity and re-authenticate if the session expired
  4. Reduce batchSize and retry to rule out size/timeout limits

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// verify connectivity and batch size before running
connection.connect();
if (meta.getBatchSizeInt() <= 0 || meta.getBatchSizeInt() > 10000) {
  throw new IllegalArgumentException("batchSize out of supported range");
}

Try / catch

try {
  flushBuffers();
} catch (KettleException e) {
  logError("Delete batch failed: " + e.getMessage());
  if (getStepMeta().isDoingErrorHandling()) {
    putError(...); // route row to error stream instead of rethrowing
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: The Salesforce delete call threw (connection failure, invalid session, API error, malformed input) and getStepMeta().isDoingErrorHandling() is false, so the error propagates.

Common situations: Salesforce outage or timeout; expired session; batch too large; invalid IDs causing the whole call to fail; no error-handling hop configured so failures are fatal.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/db2368c438972953. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java:189

                .getStatusCode(), err.getMessage() );
          }
          // Simply add this row to the error row
          if ( log.isDebug() ) {
            logDebug( BaseMessages.getString( PKG, "SalesforceDelete.PassingRowToErrorStep" ) );
          }
          putError( getInputRowMeta(), data.outputBuffer[j], 1, errorMessage, null, "SalesforceDelete001" );
        }

      }

      // reset the buffers
      data.deleteId = new String[meta.getBatchSizeInt()];
      data.outputBuffer = new Object[meta.getBatchSizeInt()][];
      data.iBufferPos = 0;

    } catch ( Exception e ) {
      if ( !getStepMeta().isDoingErrorHandling() ) {
        throw new KettleException( BaseMessages
          .getString( PKG, "SalesforceDelete.FailedToDeleted", e.getMessage() ) );
      }
      // Simply add this row to the error row
      if ( log.isDebug() ) {
        logDebug( "Passing row to error step" );
      }

      for ( int i = 0; i < data.iBufferPos; i++ ) {
        putError( data.inputRowMeta, data.outputBuffer[i], 1, e.getMessage(), null, "SalesforceDelete002" );
      }
    } finally {
      if ( data.deleteResult != null ) {
        data.deleteResult = null;
      }
    }

  }

View on GitHub (pinned to f3058517a1)