microsoftgraph / msgraph-sdk-typescript

MIT License
21 stars 3 forks source link

Internal Server Error Occurs on Delta Call After Deleting Item in SharePoint List #544

Closed Caspidev closed 5 months ago

Caspidev commented 5 months ago

I encountered an exception while working with the SDK. Here are the details:

The exception occurs only after deleting an existing item. Adding items works perfectly fine. When moving items, only creation events are received. The exception arises when trying to parse the response received after making a call to the following endpoint:

deltaDetails = await client.api(https://graph.microsoft.com/v1.0/sites/xxxxx.sharepoint.com,xxx-xxx-xxx-xxx-xxxxxx-xxx-xx-xxx-xxx/lists/xxx-xxx-xxx-xxx-xxx/items/delta?token=xxx)).get();

To further investigate, I tried accessing the endpoint using Postman with the access token. Here's the error I received:

{
  "@odata.context": "xxx",
  "@odata.deltaLink": "xxx",
  "value": [
    {
      "error": {
        "code": "InternalServerError",
        "message": "Cannot write a deleted resource, link, deleted link, or nested delta resource set within a resource set; they must be written within a delta resource set.",
        "innerError": {
          "date": "2024-04-08T16:25:28",
          "request-id": "b0deb864-f18e-47fb-9a24-08a614f0eaee",
          "client-request-id": "b0deb864-f18e-47fb-9a24-08a614f0eaee"
        }
      }
    }
  ]
}

This error seems to indicate an issue with writing a deleted resource or link within a resource set. Any insights or guidance on resolving this issue would be greatly appreciated.

koros commented 5 months ago

Hi @Caspidev,

Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage.

https://aka.ms/askgraph

For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK.

Please let us know if this helps!