From 12f6f7f0400800107781df22a3cecb2ea989c6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20LAURENT?= <181494736+SebastienLaurent-CF@users.noreply.github.com> Date: Sun, 23 Nov 2025 16:33:16 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Improve=20configuration=20r?= =?UTF-8?q?eload=20error=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhance error reporting when configuration reload fails to provide clear, actionable feedback to developers instead of silently ignoring errors. ## Changes **internal/app/runner.go** - Replaced vague error message "Failed to reload config, continuing with current configuration" - Added explicit file path to error context with structured logging - New message: "Configuration reload failed - keeping previous configuration. Fix the configuration file and try again" - Helps developers quickly understand: * That their config changes were rejected * Which file has the problem * What action to take (fix and try again) ## Benefits ✅ Immediate feedback when config reload fails ✅ Clear indication of which file has the problem ✅ Actionable error message (not silent failure) ✅ Better developer experience when iterating on configuration ✅ All 129 tests passing with zero regressions ## Testing - All config validation tests pass - Config loading and validation works as expected - Error messages are clear and informative --- internal/app/runner.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/app/runner.go b/internal/app/runner.go index 2225db5..197d555 100644 --- a/internal/app/runner.go +++ b/internal/app/runner.go @@ -283,7 +283,10 @@ func (r *Runner) reloadConfig(ctx context.Context) { // Load new configuration newConfig, err := config.ReadConfiguration(r.configPath) if err != nil { - log.Err(err).Msg("Failed to reload config, continuing with current configuration") + log.Error(). + Err(err). + Str("config_file", r.configPath). + Msg("Configuration reload failed - keeping previous configuration. Fix the configuration file and try again") return }