fix(v2): P4 终审波——歧义渠道错误留 processing(ErrRefundRejected 哨兵)/ 拒绝fixture签名 / 错误映射测试 / GetRefund 日志
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -58,7 +58,12 @@ func (h *GatewayHandler) CreateRefund(c *gin.Context) {
|
||||
func (h *GatewayHandler) GetRefund(c *gin.Context) {
|
||||
v, err := h.g.GetRefund(c.Param("refund_id"))
|
||||
if err != nil {
|
||||
util.RespondError(c, http.StatusNotFound, "refund_not_found", "退款单不存在")
|
||||
if errors.Is(err, store.ErrRefundNotFound) {
|
||||
util.RespondError(c, http.StatusNotFound, "refund_not_found", "退款单不存在")
|
||||
return
|
||||
}
|
||||
log.Printf("[v2 refund] 查询退款单失败 %s: %v", c.Param("refund_id"), err)
|
||||
util.RespondError(c, http.StatusInternalServerError, "get_refund_failed", "查询失败,请稍后重试")
|
||||
return
|
||||
}
|
||||
util.RespondSuccess(c, v)
|
||||
|
||||
Reference in New Issue
Block a user