enhance: access log method support get status when method only return error instead of status (#30409)

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
pull/30381/head
aoiasd 2024-02-04 16:35:05 +08:00 committed by GitHub
parent da50fbfbf4
commit 23aa136444
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -166,11 +166,11 @@ func getMethodStatus(i *GrpcAccessInfo) string {
return fmt.Sprintf("Grpc%s", code.String())
}
if i.status.GetCode() != 0 {
if i.status.GetCode() != 0 || i.err != nil {
return "Failed"
}
return code.String()
return "Successful"
}
func getUserName(i *GrpcAccessInfo) string {