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) <noreply@anthropic.com>
This commit is contained in:
RXWatcher
2026-05-26 06:55:11 +02:00
co-authored by Claude Opus 4.7
parent cd4f62965c
commit cadf0eaa92
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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