From e5b701aa554de42c676271415962ef8171a79ea9 Mon Sep 17 00:00:00 2001 From: agatha Date: Sat, 13 Apr 2024 22:29:15 -0400 Subject: [PATCH] update console messages --- extension/src/background.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extension/src/background.js b/extension/src/background.js index c243d52..46c92c6 100644 --- a/extension/src/background.js +++ b/extension/src/background.js @@ -31,13 +31,14 @@ function unshortenUrl(linkUrl) { fetch("http://localhost:8000/?url=" + linkUrl) .then(res => { if (!res.ok) { - console.log("error fetching result"); + console.log("Couldn't unshorten URL: " + res.statusText); } return res.json(); }) .then(unshortenedUrl => { console.log("unshortened: " + unshortenedUrl) navigator.clipboard.writeText(unshortenedUrl) - .catch(err => console.error("couldn't copy to clipboard", err)); - }); + .catch(err => console.error("Couldn't copy to clipboard: ", err)); + }) + .catch(err => {console.error("Couldn't contact server:", err)}); } \ No newline at end of file