From b2f34443384ecbdcf888d368c72b1fdfb0a0ef87 Mon Sep 17 00:00:00 2001 From: Eric Bouck Date: Tue, 10 Dec 2024 07:03:05 -0800 Subject: [PATCH] Don't log errors prematurely Allow callers to catch and determine if it is actually an error to report or not. --- packages/@runlightyear/lightyear/src/base/baseRequest.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/@runlightyear/lightyear/src/base/baseRequest.ts b/packages/@runlightyear/lightyear/src/base/baseRequest.ts index 0ae35c3c43..df98ef53b7 100644 --- a/packages/@runlightyear/lightyear/src/base/baseRequest.ts +++ b/packages/@runlightyear/lightyear/src/base/baseRequest.ts @@ -61,12 +61,6 @@ export default async function baseRequest({ const response = await fetch(url, props); if (!response.ok) { - if (!suppressLogs) - console.error( - `Base request error: ${response.status} ${response.statusText}` - ); - if (!suppressLogs) - console.error(JSON.stringify(await response.json(), null, 2)); throw new BaseRequestError(response); }