From 2129a97588346a87b9bf02a24abab7b2813696cd Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Wed, 15 Jun 2022 11:12:49 +0200 Subject: [PATCH] remove unused param --- src/domain/rageshake.ts | 4 +--- src/platform/web/dom/request/fetch.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/domain/rageshake.ts b/src/domain/rageshake.ts index e79422cd..b1468bf5 100644 --- a/src/domain/rageshake.ts +++ b/src/domain/rageshake.ts @@ -61,9 +61,7 @@ export async function submitLogsToRageshakeServer(data: RageshakeData, logsBlob: throw new Error(`Could not submit logs to ${submitUrl}, got error ${err.message}`); } const {status, body} = response; - if (status >= 200 && status < 300) { - return body.report_url; - } else { + if (status < 200 || status >= 300) { throw new Error(`Could not submit logs to ${submitUrl}, got status code ${status} with body ${body}`); } } diff --git a/src/platform/web/dom/request/fetch.js b/src/platform/web/dom/request/fetch.js index d50f6194..497ad553 100644 --- a/src/platform/web/dom/request/fetch.js +++ b/src/platform/web/dom/request/fetch.js @@ -64,7 +64,7 @@ export function createFetchRequest(createTimeout, serviceWorkerHandler) { if (requestOptions?.uploadProgress) { return xhrRequest(url, requestOptions); } - let {method, headers, body, formData, timeout, format, cache = false} = requestOptions; + let {method, headers, body, timeout, format, cache = false} = requestOptions; const controller = typeof AbortController === "function" ? new AbortController() : null; // if a BlobHandle, take native blob if (body?.nativeBlob) {