diff --git a/internal/portforward/service/service.go b/internal/portforward/service/service.go index 76d3b47a4..6177acce0 100644 --- a/internal/portforward/service/service.go +++ b/internal/portforward/service/service.go @@ -2,6 +2,7 @@ package service import ( "context" + "fmt" "net/http" "sync" ) @@ -55,8 +56,7 @@ func (s *Service) SetPortsForwarded(ctx context.Context, ports []uint16) (err er for j := range i { _ = s.portAllower.SetAllowedPort(ctx, s.ports[j], s.settings.Interface) } - s.logger.Error(err.Error()) - return err + return fmt.Errorf("removing allowed port: %w", err) } } @@ -69,8 +69,7 @@ func (s *Service) SetPortsForwarded(ctx context.Context, ports []uint16) (err er for _, port := range s.ports { _ = s.portAllower.SetAllowedPort(ctx, port, s.settings.Interface) } - s.logger.Error(err.Error()) - return err + return fmt.Errorf("setting allowed port: %w", err) } }