From d8cb437a74cc9f5ee47ed6d66e21658862e45ea0 Mon Sep 17 00:00:00 2001 From: "daniel.w" Date: Wed, 23 Oct 2024 18:07:05 +0800 Subject: [PATCH] fix test --- internal/logic/orderservice/get_order_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/logic/orderservice/get_order_logic.go b/internal/logic/orderservice/get_order_logic.go index 1d3030c..4819e0a 100644 --- a/internal/logic/orderservice/get_order_logic.go +++ b/internal/logic/orderservice/get_order_logic.go @@ -43,7 +43,7 @@ func (l *GetOrderLogic) GetOrder(in *order.GetOrderReq) (*order.GetOrderResp, er o, err := l.svcCtx.OrderModel.FindOneBusinessID(l.ctx, in.GetBusinessId()) if err != nil { - if errors.As(err, &mon.ErrNotFound) { + if errors.Is(mon.ErrNotFound, err) { return nil, domain.NotFoundError(domain.DataNotFoundErrorCode, "failed to get this order id:", in.GetBusinessId()) } return nil, err