Skip to content

Commit 9261814

Browse files
frankieyanclaude
andcommitted
fix: Log warning when config file parsing fails
Previously, JSON parsing errors in the config file were silently swallowed, falling back to defaults without any indication to the user. Now a warning is logged so users are aware of the issue. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 625d66d commit 9261814

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ function loadConfig(): Config {
4646
...DEFAULT_CONFIG,
4747
...parsed,
4848
}
49-
} catch {
49+
} catch (error) {
50+
console.warn(`Failed to parse config at ${configPath}, using defaults. Error: ${error}`)
5051
return { ...DEFAULT_CONFIG }
5152
}
5253
}

0 commit comments

Comments
 (0)