(reason: EventDropReason)
| 58 | |
| 59 | // Creates client report for each item in an envelope |
| 60 | const recordEnvelopeLoss = (reason: EventDropReason): void => { |
| 61 | // Don't record outcomes for client reports - we don't want to create a feedback loop if client reports themselves fail to send |
| 62 | if (envelopeContainsItemType(filteredEnvelope, ['client_report'])) { |
| 63 | DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`); |
| 64 | return; |
| 65 | } |
| 66 | forEachEnvelopeItem(filteredEnvelope, (item, type) => { |
| 67 | options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type)); |
| 68 | }); |
| 69 | }; |
| 70 | |
| 71 | const requestTask = (): PromiseLike<TransportMakeRequestResponse> => |
| 72 | makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then( |
no test coverage detected