diff --git a/cmd/api/src/daemons/datapipe/decoders.go b/cmd/api/src/daemons/datapipe/decoders.go index 270add8ef..74ec8bd65 100644 --- a/cmd/api/src/daemons/datapipe/decoders.go +++ b/cmd/api/src/daemons/datapipe/decoders.go @@ -46,13 +46,14 @@ func decodeBasicData[T any](batch graph.Batch, reader io.ReadSeeker, conversionF ) for decoder.More() { - //This variable needs to be initialized here, otherwise the marshaller will cache the map in the struct + // This variable needs to be initialized here, otherwise the marshaller will cache the map in the struct var decodeTarget T if err := decoder.Decode(&decodeTarget); err != nil { log.Errorf("Error decoding %T object: %v", decodeTarget, err) if errors.Is(err, io.EOF) { break } + return err } else { count++ conversionFunc(decodeTarget, &convertedData)