mirror of https://github.com/milvus-io/milvus.git
Handle nil status in `merr.OK` (#26940)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/26931/head
parent
9dae896395
commit
44f308fff5
|
@ -118,7 +118,7 @@ func oldCode(code int32) commonpb.ErrorCode {
|
|||
}
|
||||
|
||||
func Ok(status *commonpb.Status) bool {
|
||||
return status.ErrorCode == commonpb.ErrorCode_Success && status.Code == 0
|
||||
return status.GetErrorCode() == commonpb.ErrorCode_Success && status.GetCode() == 0
|
||||
}
|
||||
|
||||
// Error returns a error according to the given status,
|
||||
|
|
Loading…
Reference in New Issue