修复套餐创建事务回滚失败问题;修复 http dump 未根据环境配置打印问题;简化通道分配时计时输出
This commit is contained in:
@@ -319,11 +319,13 @@ func (c *cloud) token(refresh bool) (string, error) {
|
||||
_ = Body.Close()
|
||||
}(resp.Body)
|
||||
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return "", err
|
||||
if env.DebugHttpDump {
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
fmt.Println(string(dump))
|
||||
}
|
||||
fmt.Println(string(dump))
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return "", errors.New("failed to get token")
|
||||
|
||||
Reference in New Issue
Block a user