diff --git a/aws/s3.go b/aws/s3.go index 0c752b9..c3d99df 100644 --- a/aws/s3.go +++ b/aws/s3.go @@ -71,8 +71,8 @@ func (u *S3) Upload(ctx context.Context, opt S3UploadOptions) error { Key: &opt.RemoteObjectKey, }) if err != nil { - var noSuchKeyError *types.NoSuchKey - if !errors.As(err, &noSuchKeyError) { + var notFoundErr *types.NotFound + if !errors.As(err, ¬FoundErr) { return err } diff --git a/aws/s3_test.go b/aws/s3_test.go index 02eb176..1dfc947 100644 --- a/aws/s3_test.go +++ b/aws/s3_test.go @@ -68,7 +68,7 @@ func TestS3_Upload(t *testing.T) { t.Helper() mockS3Client := mocks.NewMockS3APIClient(t) - mockS3Client.On("HeadObject", mock.Anything, mock.Anything).Return(&s3.HeadObjectOutput{}, &types.NoSuchKey{}) + mockS3Client.On("HeadObject", mock.Anything, mock.Anything).Return(&s3.HeadObjectOutput{}, &types.NotFound{}) mockS3Client.On("PutObject", mock.Anything, mock.Anything).Return(&s3.PutObjectOutput{}, nil) return &S3{ @@ -227,7 +227,7 @@ func TestS3_Upload(t *testing.T) { t.Helper() mockS3Client := mocks.NewMockS3APIClient(t) - mockS3Client.On("HeadObject", mock.Anything, mock.Anything).Return(&s3.HeadObjectOutput{}, &types.NoSuchKey{}) + mockS3Client.On("HeadObject", mock.Anything, mock.Anything).Return(&s3.HeadObjectOutput{}, &types.NotFound{}) return &S3{ client: mockS3Client, diff --git a/plugin/impl.go b/plugin/impl.go index 2620e07..3e10691 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -76,7 +76,7 @@ func (p *Plugin) Execute() error { } if err := p.runJobs(p.Network.Context, client); err != nil { - return fmt.Errorf("error while creating sync job: %w", err) + return fmt.Errorf("error while running jobs: %w", err) } return nil