question

CharlieChen-9294 avatar image
0 Votes"
CharlieChen-9294 asked SrinivasaRaoDarna-MSFT answered

Renew presence subscription failed: Operation: Update; Exception: [Status Code: InternalServerError; Reason: Etag validation failed when updating PerUserSubscriptions........_presence in CosmosDB]

Hi team,

I meet this error when calling PATCH "/beta/subscriptions/<id> to renew an existing subscription in node js cron-job. Sometimes it works, sometimes it failed.


Does anyone know what we can do to resolve this?
Thanks!
```

 GraphError: Operation: Update; Exception: [Status Code: InternalServerError; Reason: Etag validation failed when updating PerUserSubscriptions.93d514c2-13db-416f-ab39-34f4fb1fd66e_cb559b97-b280-4980-9082-effb07bb1ee4_presence in CosmosDB] at new GraphError (/integration-presence-service/node_modules/@microsoft/microsoft-graph-client/src/GraphError.ts:61:3) at Function.GraphErrorHandler.constructErrorFromResponse (/integration-presence-service/node_modules/@microsoft/microsoft-graph-client/src/GraphErrorHandler.ts:76:18) at Function.<anonymous> (/integration-presence-service/node_modules/@microsoft/microsoft-graph-client/src/GraphErrorHandler.ts:102:31) at step (/integration-presence-service/node_modules/tslib/tslib.js:144:27) at Object.next (/integration-presence-service/node_modules/tslib/tslib.js:125:57) at /integration-presence-service/node_modules/tslib/tslib.js:118:75 at new Promise (<anonymous>) at __awaiter (/integration-presence-service/node_modules/tslib/tslib.js:114:16) at Function.GraphErrorHandler.getError (/integration-presence-service/node_modules/@microsoft/microsoft-graph-client/lib/src/GraphErrorHandler.js:85:38) at GraphRequest.<anonymous> (/integration-presence-service/node_modules/@microsoft/microsoft-graph-client/src/GraphRequest.ts:391:55) at step (/integration-presence-service/node_modules/tslib/tslib.js:144:27) at Object.throw (/integration-presence-service/node_modules/tslib/tslib.js:125:57) at rejected (/integration-presence-service/node_modules/tslib/tslib.js:116:69) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:95:5) { statusCode: 500, code: 'ExtensionError', requestId: '02082d26-5b4a-475f-b409-0e191cb1ca33', date: 2022-04-29T06:00:04.000Z, body: '{"code":"ExtensionError","message":"Operation: Update; Exception: [Status Code: InternalServerError; Reason: Etag validation failed when updating PerUserSubscriptions.93d514c2-13db-416f-ab39-34f4fb1fd66e_cb559b97-b280-4980-9082-effb07bb1ee4_presence in CosmosDB]","innerError":{"date":"2022-04-29T06:00:04","request-id":"02082d26-5b4a-475f-b409-0e191cb1ca33","client-request-id":"f6a61ad8-dd8b-7b28-1710-62c363a1625f"}}'}

```

microsoft-graph-teamwork
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SrinivasaRaoDarna-MSFT avatar image
0 Votes"
SrinivasaRaoDarna-MSFT answered

Hi @CharlieChen-9294,

From the request you are using /beta endpoint, APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

200847-beta.jpg

If this error - status code 500[Internal Server Error] happens frequently with v1.0 APIs also raise a support case with Microsoft Graph, a Support Engineer will be able to advise.

Reference: errors

Hope this helps,

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".


beta.jpg (21.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.