Skip to content

Commit f6d1602

Browse files
author
alexbondar92
authored
IG-18457: bugfix put records error response (#11)
1 parent 421346a commit f6d1602

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/v3ctl/stream/createrecord.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ func newCreateRecordCommandeer(createStreamCommandeer *createStreamCommandeer) (
6060
return errors.Wrap(err, "Failed to get create stream")
6161
}
6262

63+
putRecordsResponse, ok := response.Output.(v3io.PutRecordsOutput)
64+
if ok && putRecordsResponse.FailedRecordCount != 0 {
65+
return errors.Errorf("Failed to put all records, FailedRecordCount: %d",
66+
putRecordsResponse.FailedRecordCount)
67+
}
68+
6369
defer response.Release()
6470

6571
fmt.Printf("Wrote %d bytes to %s:%d\n",

0 commit comments

Comments
 (0)