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
sami amisami ami 

Rest API calls giving error in production.

Just ran into a very confusing error.
We have an application which makes API calls to Salesforce - specifically a POST method which uploads cases . This is working fine sandbox environment. But I get Internal server error in production.

I have everything similar in sandbox and production and is very weird to get this error.

 

Any pointers??

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

You need to look at the response body that goes along with the 500 http response.

All Answers

Satish_SFDCSatish_SFDC
The Internal server Error should have a number associated with it.
You will have to create a salesforce case to find out what exactly that number means, so you can troubleshoot the error.

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
sami amisami ami
yEs.It has 500 code with that..and thats how i got to know error is internal server error .Got this in my debug log of production.
Same things work fine in sandbox.
Satish_SFDCSatish_SFDC
An Internal Server Error would be in the format:
xxxxxxx-xxxxxxx (xxxxxxxxx)

Regards,
Satish Kumar
SuperfellSuperfell

You need to look at the response body that goes along with the 500 http response.

This was selected as the best answer
sami amisami ami
My XML body was issue and was very Odd one.
It works now.May be body was the issue.
Thanks SimonF