Skip to content

Commit d18601e

Browse files
author
Jason Yellick
committed
[FAB-5359] Add BroadcastResponse info to proto
The BroadcastResponse proto currently only returns a single status field. This was of course intentional, as clients should be utilizing the status field for any programatic decisions, such as retrying or not. However, from a usability perspective, diagnosing user error from only a status code can be quite difficult. Was the request bad because the message was malformed, or because it attempted an illegal operation? This CR simply adds a new proto field named 'info', to the BroadcastResponse proto. This info field is a string which may be populated with human readable text. There is no guarantees made about the stability of this text (the error text may change from version to version), and clients should continue to utilize the status field for any programatic decisions. Although this is a proto change, it is both forwards and backwards compatible. v1.0.x clients will be able to receive BroadcastResponses made by a v1.1.x server, and v1.1.x clients will see an unpopulated info field from v1.0.x servers. Change-Id: Ie4f227285454fab1b6794eaacdaefa42549fff23 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent 4b6a492 commit d18601e

File tree

2 files changed

+46
-32
lines changed

2 files changed

+46
-32
lines changed

protos/orderer/ab.pb.go

Lines changed: 43 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/orderer/ab.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ option java_package = "org.hyperledger.fabric.protos.orderer";
2424
package orderer;
2525

2626
message BroadcastResponse {
27+
// Status code, which may be used to programatically respond to success/failure
2728
common.Status status = 1;
29+
// Info string which may contain additional information about the status returned
30+
string info = 2;
2831
}
2932

3033
message SeekNewest { }

0 commit comments

Comments
 (0)