From 1b638adf893761c90935f018ce0910406194121a Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 28 Jul 2021 12:26:50 +0200 Subject: [PATCH] web/admin: fully remove response cloning due to errors Signed-off-by: Jens Langhammer --- web/src/api/Sentry.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index 462114c00..84dc572a4 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -33,15 +33,7 @@ export function configureSentry(canDoPpi: boolean = false): Promise { } } if (hint.originalException instanceof Response) { - const response = hint.originalException as Response; - // We only care about server errors - if (response.status < 500) { - return null; - } - // Need to clone the response, otherwise the .text() and .json() can't be re-used - const resCopy = response.clone(); - const body = await resCopy.json(); - event.message = `${response.status} ${response.url}: ${JSON.stringify(body)}` + return null; } if (event.exception) { me().then(user => {