fix(ops): 修复ops handler逻辑

This commit is contained in:
IanShaw027
2026-01-14 14:30:41 +08:00
parent 918a253851
commit 8d0767352b

View File

@@ -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.
_ = 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)
if err != nil {
response.ErrorFrom(c, err)