File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,11 @@ func FromProto(s *spb.Status) *Status {
7373 return status .FromProto (s )
7474}
7575
76- // FromError returns a Status representing err if it was produced from this
77- // package or has a method `GRPCStatus() *Status`. Otherwise, ok is false and a
78- // Status is returned with codes.Unknown and the original error message.
76+ // FromError returns a Status representing err if it was produced by this
77+ // package or has a method `GRPCStatus() *Status`.
78+ // If err is nil, a Status is returned with codes.OK and no message.
79+ // Otherwise, ok is false and a Status is returned with codes.Unknown and
80+ // the original error message.
7981func FromError (err error ) (s * Status , ok bool ) {
8082 if err == nil {
8183 return nil , true
You can’t perform that action at this time.
0 commit comments