Skip to content

Commit

Permalink
Don't log errors prematurely
Browse files Browse the repository at this point in the history
Allow callers to catch and determine if it is actually an error to report or not.
  • Loading branch information
ebouck committed Dec 10, 2024
1 parent 403c0fc commit b2f3444
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/@runlightyear/lightyear/src/base/baseRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b2f3444

Please sign in to comment.