Skip to content

Commit 700d101

Browse files
committed
better error messages.
1 parent 288ac26 commit 700d101

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/versionCheck.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function checkForUpdates(): Promise<string | null> {
2323
const currentVersion = packageInfo.version;
2424

2525
if (!packageName || !currentVersion) {
26-
logger.warn("Unable to determine package name or version");
26+
logger.warn("Unable to determine current package name or version");
2727
return null;
2828
}
2929

@@ -39,7 +39,8 @@ export async function checkForUpdates(): Promise<string | null> {
3939
const latestVersion = data.version;
4040

4141
if (!latestVersion) {
42-
throw new Error("Unable to determine latest version");
42+
logger.warn("Unable to determine determine latest published version");
43+
return null;
4344
}
4445

4546
// Compare versions
@@ -50,7 +51,7 @@ export async function checkForUpdates(): Promise<string | null> {
5051
return null;
5152
} catch (error) {
5253
// Log error but don't throw to handle gracefully
53-
logger.error(
54+
logger.warn(
5455
"Error checking for updates:",
5556
error instanceof Error ? error.message : String(error)
5657
);

0 commit comments

Comments
 (0)