Skip to content

Commit

Permalink
Verbose error
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander V. Nikolaev <[email protected]>
  • Loading branch information
avnik committed Dec 18, 2024
1 parent 7833b92 commit 399bc28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkgs/servicemanager/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *SystemdControlServer) GetUnitStatus(ctx context.Context, req *systemd_a
unitStatus, err := s.Controller.FindUnit(req.UnitName)
if err != nil {
log.Infof("[GetUnitStatus] Error finding unit: %v", err)
return nil, grpc_status.Error(grpc_codes.NotFound, "error fetching unit status")
return nil, grpc_status.Error(grpc_codes.NotFound, fmt.Sprintf("error fetching unit status: %s", req.UnitName))
}
if len(unitStatus) != 1 {
errStr := fmt.Sprintf("error, got %d units named %s", len(unitStatus), req.UnitName)
Expand Down

0 comments on commit 399bc28

Please sign in to comment.