Skip to content

Commit

Permalink
fix access log status was unkonwn when api only return error
Browse files Browse the repository at this point in the history
Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd committed Jan 31, 2024
1 parent 878c4c9 commit f7cd8ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/proxy/accesslog/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f7cd8ed

Please sign in to comment.