Skip to content

Commit

Permalink
Use correct error variable for wrapped error (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv committed Aug 24, 2024
1 parent 9c3fe7f commit 06bf82d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter/clickhouselogsexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (e *clickhouseLogsExporter) pushLogsData(ctx context.Context, ld plog.Logs)
if err != nil {
// StatementSend:code: 252, message: Too many partitions for single INSERT block
// iterating twice since we want to try once after removing the old data
if i == 1 || !strings.Contains(err.Error(), "StatementSend:code: 252") {
if i == 1 || !strings.Contains(err.Error(), "code: 252") {
// TODO(nitya): after returning it will be retried, ideally it should be pushed to DLQ
return err
}
Expand Down Expand Up @@ -439,7 +439,7 @@ func (e *clickhouseLogsExporter) pushToClickhouse(ctx context.Context, ld plog.L
// check the errors
for i := 0; i < 3; i++ {
if r := <-chErr; r != nil {
return fmt.Errorf("StatementSend:%w", err)
return fmt.Errorf("StatementSend:%w", r)
}
}

Expand Down

0 comments on commit 06bf82d

Please sign in to comment.