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

Internal Server Error (500) in Upsert

I am using Partner WSDL to perform Upsert in my .NET application. I am splitting the records in batches of 200 and using the wrapper classes to compress the request and response using gzip.


I am using FieldsToNull property to mark the fields that are null in each of the sObjects in my Upsert array. And I am also providing the Id property of the records where available. Of course, new records will not have the Id property.


However, I am getting the "Internal Server Errror" response when trying to upsert. I have never seen this error before and I don't see any other error codes that tells me precisely what's wrong with what I am trying to do.


Any help is appreciated.


Do you have the entire HTTP response when you get this? SOAP Faults are returned via a 500 http error code, perhaps you're getting a SOAP Fault.


I am also getting this error.

I am testing the upsert method generated by the enterprise wsdl by setting a few properties then pushing the object up.


All the server says is "The remote server returned an error: (500) Internal Server Error." ... not particularly helpful.


Even the stack trace lends no helpful hints ...


   at System.Net.HttpWebRequest.GetResponse()
   at Salesforce.GzipWebRequest.GetResponse() in C:\Projects\SFAPIWrapper\GzipWebRequest.cs:line 107


The status property however does reveal this ...




So something wasn't returned right.


Other calls have already been made on this API instance so I know the reference is valid, I have logged in ok and got a good response.


I even tried a batch size of less than 10 to see if it was something to do with message sizes / something with no better results.


The server does reveal much at all when it breaks ... wish it would :(


We are facing a similar problem, we get a 'Internal Server Error' when we try to do an upsert operation from a SAP system. Please let me know if you anyone has an answer to this problem.