diff --git a/client/src/main/java/com/vesoft/nebula/client/storage/scan/ScanVertexResultIterator.java b/client/src/main/java/com/vesoft/nebula/client/storage/scan/ScanVertexResultIterator.java index 0a2c24370..d94df21ce 100644 --- a/client/src/main/java/com/vesoft/nebula/client/storage/scan/ScanVertexResultIterator.java +++ b/client/src/main/java/com/vesoft/nebula/client/storage/scan/ScanVertexResultIterator.java @@ -178,7 +178,7 @@ private void handleFailedResult(ScanVertexResponse response, PartScanInfo partIn freshLeader(spaceName, partInfo.getPart(), partResult.getLeader()); partInfo.setLeader(getLeader(partResult.getLeader())); } else { - ErrorCode code = partResult.getCode(); + int code = partResult.getCode().getValue(); LOGGER.error(String.format("part scan failed, error code=%d", code)); partScanQueue.dropPart(partInfo); exceptions.add(new Exception(String.format("part scan, error code=%d", code)));