Skip to content

Commit

Permalink
Update internal/pkg/gateway/api.go
Browse files Browse the repository at this point in the history
Co-authored-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
Signed-off-by: Andrew Coleman <andrew_coleman@uk.ibm.com>
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
(cherry picked from commit 7acc7c3)
  • Loading branch information
andrew-coleman authored and denyeart committed Jan 6, 2023
1 parent 51f7525 commit 60d26e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/pkg/gateway/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,16 @@ func (gs *Server) Submit(ctx context.Context, request *gp.SubmitRequest) (*gp.Su
response, err := gs.broadcast(ctx, orderer, txn)
if err != nil {
errDetails = append(errDetails, errorDetail(orderer.endpointConfig, err.Error()))
logger.Warnw("Error sending transaction to orderer", "txID", request.TransactionId, "endpoint", orderer.address, "err", err)
continue
}

status := response.GetStatus()
if status == common.Status_SUCCESS {
return &gp.SubmitResponse{}, nil
}

logger.Warnw("Error sending transaction to orderer", "txID", request.TransactionId, "endpoint", orderer.address, "err", err, "status", status, "info", response.GetInfo())
logger.Warnw("Unsuccessful response sending transaction to orderer", "txID", request.TransactionId, "endpoint", orderer.address, "status", status, "info", response.GetInfo())

if status >= 400 && status < 500 {
// client error - don't retry
Expand Down

0 comments on commit 60d26e1

Please sign in to comment.