Handle nil status in `merr.OK` (#26940)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/26931/head
congqixia 2023-09-08 18:43:16 +08:00 committed by GitHub
parent 9dae896395
commit 44f308fff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,