Добавил логи
This commit is contained in:
@@ -265,6 +265,7 @@ func (s *server) apiCommand(w http.ResponseWriter, r *http.Request, cmd func(con
|
||||
return
|
||||
}
|
||||
if err := cmd(r.Context(), id); err != nil {
|
||||
s.deps.Logger.Warn("api command failed", "path", r.URL.Path, "id", id, "err", err)
|
||||
writeJSON(w, http.StatusConflict, errJSON(err))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user