This commit is contained in:
Fu Diwei
2025-03-24 12:35:30 +08:00
parent 892256c0b9
commit 39f8484b2a
2 changed files with 21 additions and 2 deletions

View File

@@ -84,6 +84,9 @@ func (c *Client) sendRequest(method string, path string, params interface{}) (*r
func (c *Client) sendRequestWithResult(method string, path string, params interface{}, result BaseResponse) error {
resp, err := c.sendRequest(method, path, params)
if err != nil {
if resp != nil {
json.Unmarshal(resp.Body(), &result)
}
return err
}