{"record":{"id":"fb9d6ae1a94ad235","repo":"pentaho/pentaho-kettle","slug":"nfailed-to-update-object-error-message-was-n","errorCode":null,"errorMessage":"\\nFailed to update object, error message was: \\n","messagePattern":"\\\\nFailed to update object, error message was: \\\\n","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java","lineNumber":249,"sourceCode":"          // Simply add this row to the error row\n          if ( log.isDebug() ) {\n            logDebug( \"Passing row to error step\" );\n          }\n\n          putError( getInputRowMeta(), data.outputBuffer[j], 1, errorMessage, null, \"SalesforceUpdate001\" );\n\n        }\n\n      }\n\n      // reset the buffers\n      data.sfBuffer = new SObject[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( \"\\nFailed to update object, error message was: \\n\" + e.getMessage() );\n      }\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, \"SalesforceUpdate002\" );\n      }\n\n    } finally {\n      if ( data.saveResult != null ) {\n        data.saveResult = null;\n      }\n    }\n\n  }","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java#L231-L267","documentation":"In SalesforceUpdate.flushBuffers(), when the batch update call itself throws (connection error, SOAP fault, anything before SaveResults are produced) and the step is NOT configured for error handling, it throws KettleException('\\\\nFailed to update object, error message was: \\\\n' + e.getMessage()). If error handling IS enabled, the row is instead routed to the error stream. This signals the entire Salesforce update call failed, not a single record.","triggerScenarios":"data.sf.update(...) (or equivalent batch call) throwing an exception: unreachable Salesforce endpoint, invalid session/login, SOAP connection reset, oversized batch, or API version incompatibility.","commonSituations":"Firewall/proxy blocking the Salesforce endpoint; expired password changed by admin invalidating the security token; batchSize too large causing timeouts; wrong API URL configured in the connection dialog.","solutions":["Read the message after 'error message was:' — it carries the underlying connection/SOAP error.","Test the Salesforce connection from the step dialog (Test connection) and re-enter the security token if the password changed.","Reduce the batch size in the step settings to avoid oversized/timeout-prone requests.","Enable error handling on the step so failed rows go to an error stream rather than killing the transformation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Verify endpoint reachability before running\ntry {\n  HttpURLConnection c = (HttpURLConnection) new URL(endpointUrl).openConnection();\n  c.setConnectTimeout(5000);\n  if (c.getResponseCode() >= 500) throw new IllegalStateException(\"Salesforce endpoint unhealthy\");\n} catch (IOException e) {\n  throw new IllegalStateException(\"Cannot reach Salesforce endpoint\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n  trans.waitUntilFinished();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"Failed to update object\")) {\n    // transient Salesforce/network failure: back off and retry the transformation\n  }\n}","preventionTips":["Re-test the Salesforce connection after any password/security-token change.","Reduce batchSize to lower request size and timeout risk.","Ensure firewalls/proxies allow the Salesforce endpoint (login.salesforce.com / *.salesforce.com).","Enable error handling so failed rows go to an error stream instead of aborting the run."],"tags":["salesforce","network","batch-write","connection"],"backgroundTag":"http-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"}