Skip to content

Commit

Permalink
feat: add error message if analyze request fail (#393)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
  • Loading branch information
matthisholleville committed May 9, 2023
1 parent 123b8a6 commit 639aa12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/server/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package server

import (
"context"
"fmt"
"time"

"go.uber.org/zap"
Expand Down Expand Up @@ -34,7 +35,7 @@ func logInterceptor(logger *zap.Logger) grpc.UnaryServerInterceptor {
}
message := "request completed"
if err != nil {
message = "request failed"
message = fmt.Sprintf("request failed. %s", err.Error())
}
logRequest(logger, fields, int(status.Code(err)), message)

Expand Down

0 comments on commit 639aa12

Please sign in to comment.