From 55bf25e338033157eff931a2c98c75c6197eb3e8 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 30 Oct 2025 17:43:42 -0700 Subject: [PATCH] handle parse error --- weed/wdclient/masterclient.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index 9f3f3ba49..7b789eceb 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -136,7 +136,11 @@ func (mc *MasterClient) LookupVolumeIdsWithFallback(ctx context.Context, volumeI // Parse volume ID from response (could be "123" or "123,abc") parts := strings.Split(vidString, ",") vidOnly := parts[0] - vid, _ := strconv.ParseUint(vidOnly, 10, 32) + vid, err := strconv.ParseUint(vidOnly, 10, 32) + if err != nil { + glog.Warningf("Failed to parse volume id '%s' from master response '%s': %v", vidOnly, vidString, err) + continue + } var locations []Location for _, masterLoc := range vidLoc.Locations {