dtmtec / restforce-bulk

Client for Salesforce Bulk API
MIT License
7 stars 45 forks source link

batch.results doesn't has error #10

Closed mritzi closed 3 years ago

mritzi commented 3 years ago

In the README its mentioned to get errors from results of a batch :

batch.results.each do |result|
  puts result.id      # Id of the result
  puts result.success # row successfully processed
  puts result.error   # error for row
end

However, when I implement it, I only get this for result object for a failed record after job is completed(insert): #<Restforce::Bulk::Result:0x000000000b17fe98 @job_id="7502x0000055VobAAE", @batch_id="7512x000005XpjSAAS", @success="false", @created="false">

Please help me understand how can I get error message.

mritzi commented 3 years ago

Figured it out from this documentation & gem code that it was happening due of default content_type= :xml value, if you use :csv, one gets error in the result. [Limitation with :xml is from SF side]