aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryogi sofiharja <hardja.ogie@gmail.com>2023-07-11 22:17:45 +0700
committerShulhan <ms@kilabit.info>2023-07-12 00:18:49 +0700
commit03e36df0b972b41724d4ebedc1e38a79b561cac1 (patch)
treef54eab238862faa0f46bc1b08eb2bf4aa54a9549
parente6348a81f15d5930016162eb77404b4f08612bc1 (diff)
downloadduitku-03e36df0b972b41724d4ebedc1e38a79b561cac1.tar.xz
client/merchant_inquiry: return 4xx error from duitku
By returning 4xx error, client can return the correct error given by duitku
-rw-r--r--client.go2
1 files changed, 1 insertions, 1 deletions
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)
}