diff --git a/internal/server/handlers_docgov.go b/internal/server/handlers_docgov.go index e20a06e2..47e04006 100644 --- a/internal/server/handlers_docgov.go +++ b/internal/server/handlers_docgov.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "fmt" + "log/slog" "net/http" "strconv" "strings" @@ -14,6 +15,7 @@ import ( "chat-agent-system/internal/app/uow" "chat-agent-system/internal/contracts/vocabulary" "chat-agent-system/internal/docgov" + "chat-agent-system/internal/httpx" "chat-agent-system/internal/projectinstance" ) @@ -201,6 +203,9 @@ func (s *Server) handleDocGovApproverDecision(w http.ResponseWriter, r *http.Req } if err != nil { + slog.Warn("docgov approver decision failed", + "request_id", httpx.RequestID(r), "doc_id", req.DocID, + "action", action, "user_id", user.ID, "error", err.Error()) if errors.Is(err, uow.ErrPermissionDenied) { writeSafeError(w, r, http.StatusForbidden, "approver decision failed: "+err.Error()) return