Commit f6437e71 authored by zhourong's avatar zhourong

refactor(*): add more log

parent 84277dbf
......@@ -334,6 +334,7 @@ func (c *Client) InvokeInterchain(from string, index uint64, destAddr string, ca
if err != nil {
if strings.Contains(err.Error(), "Chaincode status Code: (500)") {
res.ChaincodeStatus = shim.ERROR
logger.Error("execute request failed", "err", err.Error())
return nil
}
return fmt.Errorf("execute request: %w", err)
......@@ -344,6 +345,8 @@ func (c *Client) InvokeInterchain(from string, index uint64, destAddr string, ca
logger.Error("Can't send rollback ibtp back to bitxhub", "err", err.Error())
}
logger.Info("response", "cc status", strconv.Itoa(int(res.ChaincodeStatus)), "payload", string(res.Payload), res.ChaincodeStatus)
response := &Response{}
if err := json.Unmarshal(res.Payload, response); err != nil {
return nil, nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment