diff options
| author | yogi sofiharja <hardja.ogie@gmail.com> | 2023-07-11 22:17:45 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-07-12 00:18:49 +0700 |
| commit | 03e36df0b972b41724d4ebedc1e38a79b561cac1 (patch) | |
| tree | f54eab238862faa0f46bc1b08eb2bf4aa54a9549 | |
| parent | e6348a81f15d5930016162eb77404b4f08612bc1 (diff) | |
| download | duitku-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.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) } |
