mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-20 01:47:58 +00:00
refactor: optimize third-party sdks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package safelinesdk
|
||||
package safeline
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
@@ -66,9 +66,9 @@ func (c *Client) sendRequestWithResult(path string, params interface{}, result B
|
||||
return fmt.Errorf("safeline api error: failed to parse response: %w", err)
|
||||
} else if errcode := result.GetErrCode(); errcode != nil && *errcode != "" {
|
||||
if result.GetErrMsg() == nil {
|
||||
return fmt.Errorf("safeline api error: %s", *errcode)
|
||||
return fmt.Errorf("safeline api error: code='%s'", *errcode)
|
||||
} else {
|
||||
return fmt.Errorf("safeline api error: %s - %s", *errcode, *result.GetErrMsg())
|
||||
return fmt.Errorf("safeline api error: code='%s', message='%s'", *errcode, *result.GetErrMsg())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user