Commit 8d076735 authored by IanShaw027's avatar IanShaw027
Browse files

fix(ops): 修复ops handler逻辑

parent 918a2538
...@@ -658,6 +658,14 @@ func (h *OpsHandler) RetryErrorRequest(c *gin.Context) { ...@@ -658,6 +658,14 @@ func (h *OpsHandler) RetryErrorRequest(c *gin.Context) {
// Force flag is currently a UI-level acknowledgement. Server may still enforce safety constraints. // Force flag is currently a UI-level acknowledgement. Server may still enforce safety constraints.
_ = req.Force _ = req.Force
// Legacy endpoint safety: only allow retrying the client request here.
// Upstream retries must go through the split endpoints.
if strings.EqualFold(strings.TrimSpace(req.Mode), service.OpsRetryModeUpstream) {
response.BadRequest(c, "upstream retry is not supported on this endpoint")
return
}
result, err := h.opsService.RetryError(c.Request.Context(), subject.UserID, id, req.Mode, req.PinnedAccountID) result, err := h.opsService.RetryError(c.Request.Context(), subject.UserID, id, req.Mode, req.PinnedAccountID)
if err != nil { if err != nil {
response.ErrorFrom(c, err) response.ErrorFrom(c, err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment