Share via

Error code 500 When Updating the Item

Anonymous
2024-03-14T15:36:18.0966667+00:00
 def update_data(self,df):
    if len(df) != 0 :
      df.fillna('', inplace=True)
      for _,row in df.iterrows():
        params = self.get_params(row)
        response = requests.get(params['url'], headers=self.get_headers(), params=params['query'])
        item_id = response.json()['value'][0]['id']
      
        new_url = f"{params['url']}/{item_id}"
        data = {"fields": params['fields']}
        new_response = requests.patch(new_url,headers=self.get_headers(),json=data)
        raise ValueError(new_response.json())


I'm using Microsoft Graph API to create and update an Item. I got able to create an Item, now i'm trying to follow the url https://learn.microsoft.com/en-us/graph/api/listitem-update?view=graph-rest-1.0&tabs=http to update the request. I'm getting 500 {'error': {'code': 'generalException', 'message': 'General exception while processing'}}. I don't understand why I'm having an issue since I followed the documentation

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.