From cadf0eaa92e3368653c06ada62c3a9da341ad67a Mon Sep 17 00:00:00 2001 From: RXWatcher <14085001+RXWatcher@users.noreply.github.com> Date: Tue, 26 May 2026 06:55:11 +0200 Subject: [PATCH] chore(audiobooks): normalize slog "err" key and add path to secret-fetch log Brings the pre-existing cred-validator error log into line with the new keys added in cd4f629 (all use "err"). Adds "path" to the jwt-secret fetch error log so it matches its sibling rejection logs. Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/audiobooks/abs/handler.go | 2 +- internal/audiobooks/abs/login.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/audiobooks/abs/handler.go b/internal/audiobooks/abs/handler.go index aec54411..50178486 100644 --- a/internal/audiobooks/abs/handler.go +++ b/internal/audiobooks/abs/handler.go @@ -372,7 +372,7 @@ func (h *Handler) bearerAuth(next http.Handler) http.Handler { } secret, err := h.deps.Config.JWTSecret(r.Context()) if err != nil { - slog.Error("abs bearerAuth: jwt secret fetch failed", "err", err) + slog.Error("abs bearerAuth: jwt secret fetch failed", "err", err, "path", r.URL.Path) http.Error(w, "config unavailable", http.StatusInternalServerError) return } diff --git a/internal/audiobooks/abs/login.go b/internal/audiobooks/abs/login.go index 47b749fa..10746d8f 100644 --- a/internal/audiobooks/abs/login.go +++ b/internal/audiobooks/abs/login.go @@ -88,7 +88,7 @@ func (h *Handler) handleStandaloneLogin(w http.ResponseWriter, r *http.Request) if errors.Is(err, auth.ErrInvalidCredentials) || errors.Is(err, auth.ErrUserDisabled) { http.Error(w, "invalid username or password", http.StatusUnauthorized) } else { - slog.Error("abs login: cred validator failed", "username", body.Username, "error", err) + slog.Error("abs login: cred validator failed", "username", body.Username, "err", err) http.Error(w, "login service unavailable", http.StatusServiceUnavailable) } return