From 3b59852ad567637fa087e180062acdc5337b5383 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Wed, 13 Mar 2024 12:36:49 +0100 Subject: [PATCH] Wrap urls in quotes when logging --- src/lib/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/util.ts b/src/lib/util.ts index a37d6ef..cec2566 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -22,7 +22,7 @@ export async function fetchWithTimeout( url: string, timeout: number = TIMEOUT, ): Promise { - log.debug({ message: `Starting fetch request to ${url}` }); + log.debug({ message: `Starting fetch request to "${url}"` }); const fetchPromise = fetch(url); const timeoutPromise = new Promise((_, reject) => setTimeout( @@ -63,7 +63,7 @@ export async function fetchData( : response.text()); return data as T; } catch (error) { - log.error({ msg: `Error fetching data from ${url}:`, error }); + log.error({ msg: `Error fetching data from "${url}":`, error }); throw error; } }