From 76dee084cf6d32f2025bc7375513a4b3d7f2d1f0 Mon Sep 17 00:00:00 2001 From: s-shiraki Date: Wed, 18 Dec 2024 00:07:29 +0900 Subject: [PATCH] Update pkg/index/job/exportation/service/exporter.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: s-shiraki --- pkg/index/job/exportation/service/exporter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/index/job/exportation/service/exporter.go b/pkg/index/job/exportation/service/exporter.go index 32f5a662ff..80d830c3a9 100644 --- a/pkg/index/job/exportation/service/exporter.go +++ b/pkg/index/job/exportation/service/exporter.go @@ -140,7 +140,8 @@ func (e *export) doExportIndex( ctx, cancel := context.WithCancelCause(egctx) gatewayAddrs := e.gateway.GRPCClient().ConnectedAddrs() if len(gatewayAddrs) == 0 { - log.Errorf("Active gateway is not found.: %v ", ctx.Err()) + log.Errorf("Active gateway is not found: %v", ctx.Err()) + return errors.New("no active gateways available") } conn, err := grpc.NewClient(gatewayAddrs[0], grpc.WithTransportCredentials(insecure.NewCredentials()))