Skip to content

Commit d91a795

Browse files
committed
fix: linters
1 parent 02500b4 commit d91a795

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/plugin/processor/builtin/impl/cohere/processor_command.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ package cohere
1616

1717
import (
1818
"context"
19-
"errors"
2019
"fmt"
2120
"time"
2221

2322
cohere "github.com/cohere-ai/cohere-go/v2"
2423
cohereClient "github.com/cohere-ai/cohere-go/v2/client"
2524
"github.com/conduitio/conduit-commons/opencdc"
2625
sdk "github.com/conduitio/conduit-processor-sdk"
26+
"github.com/conduitio/conduit/pkg/foundation/cerrors"
2727
)
2828

2929
func (p *Processor) processCommandModel(ctx context.Context, records []opencdc.Record) []sdk.ProcessedRecord {
@@ -51,9 +51,9 @@ func (p *Processor) processCommandModel(ctx context.Context, records []opencdc.R
5151

5252
if err != nil {
5353
switch {
54-
case errors.As(err, &cohere.GatewayTimeoutError{}),
55-
errors.As(err, &cohere.InternalServerError{}),
56-
errors.As(err, &cohere.ServiceUnavailableError{}):
54+
case cerrors.As(err, &cohere.GatewayTimeoutError{}),
55+
cerrors.As(err, &cohere.InternalServerError{}),
56+
cerrors.As(err, &cohere.ServiceUnavailableError{}):
5757

5858
if attempt < p.config.BackoffRetryCount {
5959
sdk.Logger(ctx).Debug().Err(err).Float64("attempt", attempt).
@@ -86,7 +86,6 @@ func (p *Processor) processCommandModel(ctx context.Context, records []opencdc.R
8686
}
8787
out = append(out, sdk.SingleRecord(record))
8888
break
89-
9089
}
9190
}
9291
return out

0 commit comments

Comments
 (0)