chore: stabilize chatwoot parity baseline

This commit is contained in:
2026-06-04 18:12:50 +08:00
parent 8ac150bc7b
commit 42cdab880c
39 changed files with 1028 additions and 696 deletions
@@ -40,7 +40,7 @@ func (h *AutoReplyRuleHandler) Create(c *gin.Context) {
result, err := h.svc.CreateRule(c.Request.Context(), uint(accountID), &req)
if err != nil {
applogger.L().Errorf("AutoReplyRuleHandler.Create failed: %v", err)
response.AbortWithStatusError(c, http.StatusInternalServerError, "create_failed", "Failed to create auto-reply rule")
response.AbortWithStatusError(c, http.StatusUnprocessableEntity, "create_failed", "Failed to create auto-reply rule")
return
}
@@ -96,7 +96,7 @@ func (h *AutoReplyRuleHandler) Update(c *gin.Context) {
result, err := h.svc.UpdateRule(c.Request.Context(), uint(accountID), uint(ruleID), &req)
if err != nil {
applogger.L().Errorf("AutoReplyRuleHandler.Update failed: %v", err)
response.AbortWithStatusError(c, http.StatusInternalServerError, "update_failed", "Failed to update auto-reply rule")
response.AbortWithStatusError(c, http.StatusUnprocessableEntity, "update_failed", "Failed to update auto-reply rule")
return
}
@@ -120,7 +120,7 @@ func (h *AutoReplyRuleHandler) Delete(c *gin.Context) {
if err := h.svc.DeleteRule(c.Request.Context(), uint(accountID), uint(ruleID)); err != nil {
applogger.L().Errorf("AutoReplyRuleHandler.Delete failed: %v", err)
response.AbortWithStatusError(c, http.StatusInternalServerError, "delete_failed", "Failed to delete auto-reply rule")
response.AbortWithStatusError(c, http.StatusUnprocessableEntity, "delete_failed", "Failed to delete auto-reply rule")
return
}