{"record":{"id":"db2368c438972953","repo":"pentaho/pentaho-kettle","slug":"salesforcedelete-failedtodeleted","errorCode":null,"errorMessage":"SalesforceDelete.FailedToDeleted","messagePattern":"SalesforceDelete\\.FailedToDeleted","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java","lineNumber":189,"sourceCode":"                .getStatusCode(), err.getMessage() );\n          }\n          // Simply add this row to the error row\n          if ( log.isDebug() ) {\n            logDebug( BaseMessages.getString( PKG, \"SalesforceDelete.PassingRowToErrorStep\" ) );\n          }\n          putError( getInputRowMeta(), data.outputBuffer[j], 1, errorMessage, null, \"SalesforceDelete001\" );\n        }\n\n      }\n\n      // reset the buffers\n      data.deleteId = new String[meta.getBatchSizeInt()];\n      data.outputBuffer = new Object[meta.getBatchSizeInt()][];\n      data.iBufferPos = 0;\n\n    } catch ( Exception e ) {\n      if ( !getStepMeta().isDoingErrorHandling() ) {\n        throw new KettleException( BaseMessages\n          .getString( PKG, \"SalesforceDelete.FailedToDeleted\", e.getMessage() ) );\n      }\n      // Simply add this row to the error row\n      if ( log.isDebug() ) {\n        logDebug( \"Passing row to error step\" );\n      }\n\n      for ( int i = 0; i < data.iBufferPos; i++ ) {\n        putError( data.inputRowMeta, data.outputBuffer[i], 1, e.getMessage(), null, \"SalesforceDelete002\" );\n      }\n    } finally {\n      if ( data.deleteResult != null ) {\n        data.deleteResult = null;\n      }\n    }\n\n  }\n","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java#L171-L207","documentation":"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.","triggerScenarios":"The Salesforce delete call threw (connection failure, invalid session, API error, malformed input) and getStepMeta().isDoingErrorHandling() is false, so the error propagates.","commonSituations":"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.","solutions":["Inspect the chained cause message for the real Salesforce failure","Configure error handling on the step so failures are captured instead of aborting","Verify connectivity and re-authenticate if the session expired","Reduce batchSize and retry to rule out size/timeout limits"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"// verify connectivity and batch size before running\nconnection.connect();\nif (meta.getBatchSizeInt() <= 0 || meta.getBatchSizeInt() > 10000) {\n  throw new IllegalArgumentException(\"batchSize out of supported range\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  flushBuffers();\n} catch (KettleException e) {\n  logError(\"Delete batch failed: \" + e.getMessage());\n  if (getStepMeta().isDoingErrorHandling()) {\n    putError(...); // route row to error stream instead of rethrowing\n  } else {\n    throw e;\n  }\n}","preventionTips":["Configure error handling so individual failures don't abort the transformation","Reduce batchSize if timeouts or API limits cause whole-batch failures","Verify credentials/session validity before long delete runs","Retry transient failures with exponential backoff in the orchestrating job"],"tags":["salesforce","delete","api-error","error-handling"],"backgroundTag":"api-request-failed","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"}