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:
co-authored by
Claude Opus 4.7
parent
cd4f62965c
commit
cadf0eaa92
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user