none
Microsoft office 365 Planner rest API RRS feed

  • Question

  • I see below error when I try to update task details.( microsoft graph API). My If-Match etag matches task etag. I don’t think that is an issue.  Will you be able to debug using client-request-id ? 

    client-request-id: 00dbaf4c-a772-4902-9c7e-e8674f78842e
    content-type: application/json
    cache-control: private
    request-id: 00dbaf4c-a772-4902-9c7e-e8674f78842e
    Status Code: 412
    {
    "error": {
    "code": "UnknownError",
    "message": "",
    "innerError": {
    "request-id": "00dbaf4c-a772-4902-9c7e-e8674f78842e",
    "date": "2017-04-05T21:37:29"
    }
    }
    }

    Sunday, April 9, 2017 3:38 PM

All replies

  • Hi,

    If the server sends back a 412 response (Precondition Failed), then we have a concurrency issue, so call the function again with the existing deferred object.

    error: function(data, a, b) {
            
      if (data.status === 412) {
    	ProjectName.Functions.GetNextSeq(abbrev, deferred);
    
      }
    }
    

    More information is here:

    https://www.itunity.com/article/etags-sharepoint-rest-calls-manage-concurrency-control-2761

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 10, 2017 8:43 AM
    Moderator
  • Hi Dennis,

    Thanks for your reply.

    I am doing a patch right after a get. No one modified the task. Still I get 412 error which doesn't make sense to me. I don't see why 412 error is being returned in this case.

    Eg:

    GET response:

    etag: W/"JzEtVGFza0RldGFpbHMgQEBAQEBAQEBAQEBAQEBAaCc="
    content-type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
    cache-control: private
    client-request-id: 890a810d-0826-429e-903f-d20071555742
    request-id: 890a810d-0826-429e-903f-d20071555742
    Status Code: 200
    {
        "@odata.context": "https://graph.microsoft.com/beta/$metadata#planner/tasks('cq0Ja3wj4U2vtJL9qtQSX2QAEuo4')/details/$entity",
        "@odata.etag": "W/\"JzEtVGFza0RldGFpbHMgQEBAQEBAQEBAQEBAQEBAaCc=\"",
        "description": "tyghgjgsdfdssdsdf",
        "previewType": "description",
        "references": {},
        "checklist": {
            "13582": {
                "@odata.type": "#microsoft.graph.plannerChecklistItem",
                "isChecked": false,
                "title": "jsahdjas",
                "orderHint": "0009005707731295997\"F",
                "lastModifiedBy": {
                    "user": {
                        "displayName": null,
                        "id": "93bee221-153c-4970-a511-d5c65cb88765"
                    }
                },
                "lastModifiedDateTime": "2017-04-07T00:04:05.099Z"
            }
        },
        "id": "cq0Ja3wj4U2vtJL9qtQSX2QAEuo4"
    }

    PATCH: 

    body

    {
        "description": "hello"
    }

    client-request-id: 16fd0bff-00ce-454c-8066-a28d7e209324
    content-type: application/json
    cache-control: private
    request-id: 16fd0bff-00ce-454c-8066-a28d7e209324
    Status Code: 412
    {
        "error": {
            "code": "UnknownError",
            "message": "",
            "innerError": {
                "request-id": "16fd0bff-00ce-454c-8066-a28d7e209324",
                "date": "2017-04-11T22:53:50"
            }
        }
    }


    • Edited by pkode Wednesday, April 12, 2017 9:55 PM
    Tuesday, April 11, 2017 10:59 PM
  • I see this issue only in graph explorer. 
    Wednesday, April 12, 2017 10:34 PM