function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jordane_BACHELETJordane_BACHELET 

Bulk API JSON requests returns "Unable to read request: No content to map to Object due to end of input" error

Hi,

I'm currently working with the BULK API (upsert mode) in NodeJS. I would like to use the JSON content type for both requests and payloads for batches. Requests are created correctly as I receive job and batches details but when Salesforce reads the payload of my batch request, it returns the error "Unable to read request: No content to map to Object due to end of input".

I confirm that the JSON sent in the payload is valid (validated by JSONLint). I also correctly set the external ID on both job details and objects in the payload.

Someone already have this error message?

Thanks in advance for your help,
Jordane
Best Answer chosen by Jordane_BACHELET
Jordane_BACHELETJordane_BACHELET
If someone goes here with the same issue, I solved this. It was due to bad formatting date field (I sent a datetime format instead of a date format). This solve the issue, even if the error message is not really helpful.

All Answers

Jordane_BACHELETJordane_BACHELET
If someone goes here with the same issue, I solved this. It was due to bad formatting date field (I sent a datetime format instead of a date format). This solve the issue, even if the error message is not really helpful.
This was selected as the best answer
sherry pengsherry peng
This error also happens if the target org miss fields which is specified in your payload. For example, in your payload has isActive__c field, but the target object does not have this field or the running user does not have write permission to this field.
Bartosz GrabskiBartosz Grabski
I had the same issue when I provided a value for a deleted field.
Michael EstlerMichael Estler
Another bonehead way to get this error is if you accidentally have two columns of the same data.  :P
Robert Frumkin 44Robert Frumkin 44
I had the same error when loading Tasks.  It was caused by ActivityDate.  We tried loading datetime data.  Once we changed it to date data, the load worked.