1
votes

We wrote an application that consumes the SharePoint 2010 REST API. The application works fine in our Dev and Test environments. When we try our production site we get a 500 status code and the following is in the response body.

{
    "error": {
        "code": "",
        "message": {
            "lang": "en-US",
            "value": "An error occurred while processing this request."
       }
    }
}

We have checked for code, and list definition mismatches against all environments. We have checked the SharePoint and Windows application logs. We are checking to see if maybe some bad data is causing the problem.

Really scratching our head over here on this one.

Any ideas would be much appreciated.

Background

  • SharePoint 2010 Server
  • Using SharePoint 2010 REST service listdata.svc
  • Using AngularJS $http service to call the REST API
  • Only one of 6 Lists return the 500 errors
  • Can reproduce error using Postman.

Update

We have confirmed that it is not a data issue.

1
I was having the same type of problem. I've not fully located the source and cause, but it has to do with the specifics of how my SharePoint lists and Libraries were configured, causing an error to be thrown when certain list items were retrieved. Removing the offending fields from my OData query or adjusting the $filter to avoid offending records allows the query to finish.Zarepheth

1 Answers

0
votes

I ran into a similar problem yesterday, I rolled back any changes I had been working on and it turned out to be related to my workflows. I backed up the workflows with this Export to Visio method Export to Visio and deleted all my workflows. And it the REST service started working again for this list, other lists were still working fine. One of my workflows had an impersonate step that I suspect has something to do with locking up the service.

I was about to backup/restore the list but got lucky with this fix.