Skip to content

Commit

Permalink
Wrap urls in quotes when logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Mar 13, 2024
1 parent 4fcb1c1 commit 3b59852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function fetchWithTimeout(
url: string,
timeout: number = TIMEOUT,
): Promise<Response> {
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(
Expand Down Expand Up @@ -63,7 +63,7 @@ export async function fetchData<T>(
: 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;
}
}

0 comments on commit 3b59852

Please sign in to comment.