diff --git a/experimental/packages/otlp-exporter-base/src/platform/browser/util.ts b/experimental/packages/otlp-exporter-base/src/platform/browser/util.ts index 1c6d60ca7b..2d2de4c846 100644 --- a/experimental/packages/otlp-exporter-base/src/platform/browser/util.ts +++ b/experimental/packages/otlp-exporter-base/src/platform/browser/util.ts @@ -200,13 +200,9 @@ export function sendWithFetch( body, }).then( response => { - if (response.ok) { - response.text().then( - t => diag.debug('Request Success', t), - () => {} - ); + if (response.status >= 200 && response.status <= 299) { return; - } else if (isExportRetryable(response.status) && retries > 0) { + } else if (response.status && isExportRetryable(response.status) && retries > 0) { let retryTime: number; minDelay = DEFAULT_EXPORT_BACKOFF_MULTIPLIER * minDelay;