# Error information for telemetry replication:medic:to:failure:reason:error

**URL:** <https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489>\
**Category:** Technical Support\
**Created:** [February 20, 2023, 4:51pm UTC](https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489 "2023-02-20T16:51:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenn](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/kenn/32/55_2.png) [@kenn](https://forum.communityhealthtoolkit.org/u/kenn)\
**Post date:** [February 20, 2023, 4:51pm UTC](https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489/1 "2023-02-20T16:51:18Z")

</div>

I have 500 or so cases of the telemetry event `replication:medic:to:failure:reason:error`.  
Is there a path to understanding the error which caused this in more details?

---

<div class="post-metadata">

**Author:** ![diana](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/diana/32/2049_2.png) [@diana](https://forum.communityhealthtoolkit.org/u/diana)\
**Post date:** [February 20, 2023, 5:23pm UTC](https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489/2 "2023-02-20T17:23:32Z")

</div>

Hi @kenn

You won’t be able to get additional data through telemetry, which is just a counter of these events happening. There is no additional granularity for the error type (though we do have separate categories for fetch and response parse failures).

Relevant webapp code: [https://github.com/medic/cht-core/blob/496a2bc9d945ed8cb0bb9e503a16d777fbecc465/webapp/src/ts/services/db-sync.service.ts#L430](https://github.com/medic/cht-core/blob/496a2bc9d945ed8cb0bb9e503a16d777fbecc465/webapp/src/ts/services/db-sync.service.ts#L430)

I suggest you check feedback docs to get more details about these failures.  
I would be very interested in hearing your findings.

---

<div class="post-metadata">

**Author:** ![kenn](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/kenn/32/55_2.png) [@kenn](https://forum.communityhealthtoolkit.org/u/kenn)\
**Post date:** [February 20, 2023, 9:58pm UTC](https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489/3 "2023-02-20T21:58:27Z")

</div>

[Here](https://github.com/medic/cht-core/blob/051b3322e66fbd95f86f0cccb4ed09bcc35f3bda/webapp/src/ts/services/db-sync.service.ts#L145) and [Here](https://github.com/medic/cht-core/blob/051b3322e66fbd95f86f0cccb4ed09bcc35f3bda/webapp/src/ts/services/db-sync.service.ts#L255) it looks like telemetry events are recorded without creating a feedback doc. Am I reading that right? Or should I expect one feedback doc for each replication failure with `reason:error`?

---

<div class="post-metadata">

**Author:** ![diana](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/diana/32/2049_2.png) [@diana](https://forum.communityhealthtoolkit.org/u/diana)\
**Post date:** [February 21, 2023, 6:09am UTC](https://forum.communityhealthtoolkit.org/t/error-information-for-telemetry-replicationtoreason-error/2489/4 "2023-02-21T06:09:27Z")

</div>

Recording telemetry and registering a feedback doc should be independent. Feedback docs get created automatically on uncaught errors.  
Are you not finding feedback docs for those replication failures? Please share your results.

I’ve created an issue yesterday after noticing that failed report submissions don’t create feedback docs: [Caught errors do not generate feedback documents. · Issue #8089 · medic/cht-core · GitHub](https://github.com/medic/cht-core/issues/8089) .  
We should make sure feedback docs get created when unexpected errors happened, even if we got better at catching them.
