Skip to content

Commit

Permalink
Add extra trace logs for tessera
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Nov 25, 2022
1 parent f4dd848 commit 59af00a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion private/engine/tessera/tessera.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ func (t *tesseraPrivateTxManager) receive(data common.EncryptedPayloadHash, isRa
}

response := new(receiveResponse)
if statusCode, err := t.submitJSON("GET", fmt.Sprintf("/transaction/%s?isRaw=%v", url.PathEscape(data.ToBase64()), isRaw), nil, response); err != nil {
uri := fmt.Sprintf("/transaction/%s?isRaw=%v", url.PathEscape(data.ToBase64()), isRaw)
if statusCode, err := t.submitJSON("GET", uri, nil, response); err != nil {

if statusCode == http.StatusNotFound {
log.Debug("data not found in tessera", "uri", uri, "statuscode", statusCode, "err", err)
return "", nil, nil, nil, nil
} else {
log.Error("Failed to fetch data from tessera", "uri", uri, "statuscode", statusCode, "err", err)
return "", nil, nil, nil, err
}
}
Expand Down

0 comments on commit 59af00a

Please sign in to comment.