mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Handle nil status in merr.OK (#26940)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
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…
x
Reference in New Issue
Block a user