From 03e36df0b972b41724d4ebedc1e38a79b561cac1 Mon Sep 17 00:00:00 2001 From: yogi sofiharja Date: Tue, 11 Jul 2023 22:17:45 +0700 Subject: client/merchant_inquiry: return 4xx error from duitku By returning 4xx error, client can return the correct error given by duitku --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 169d955..5d53f6e 100644 --- a/client.go +++ b/client.go @@ -274,7 +274,7 @@ func (cl *Client) MerchantInquiry(req *MerchantInquiry) (resp *MerchantInquiryRe if err != nil { return nil, fmt.Errorf(`%s: %w`, logp, err) } - if httpRes.StatusCode >= 400 { + if httpRes.StatusCode >= 500 { return nil, fmt.Errorf(`%s: %s: %s`, logp, httpRes.Status, resBody) } -- cgit v1.3