Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
chore: use verbose log
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious committed Jul 9, 2023
1 parent 2cb9b73 commit 524cd2f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/service/user/user.service.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ func (s *serviceImpl) FindOne(_ context.Context, req *proto.FindOneUserRequest)
if ok {
switch st.Code() {
case codes.NotFound:
log.Error().
Err(err).
Str("service", "user").
Str("module", "find one").
Str("id", req.Id).
Msg("User image not found")
return &proto.FindOneUserResponse{User: RawToDto(&raw, "")}, nil

case codes.Unavailable:
Expand Down Expand Up @@ -78,6 +84,13 @@ func (s *serviceImpl) FindOne(_ context.Context, req *proto.FindOneUserRequest)
return nil, err
}

log.Error().
Err(err).
Str("service", "user").
Str("module", "find one").
Str("id", req.Id).
Msg("Found user image")

return &proto.FindOneUserResponse{User: RawToDto(&raw, url)}, nil
}

Expand Down

0 comments on commit 524cd2f

Please sign in to comment.