Skip to content

Commit

Permalink
lets see if something breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Jan 7, 2025
1 parent 4aee694 commit cce44f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/local/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (s *SyncManager) downloadFile(ctx context.Context, remote *uri.URI, path, d
if errors.Is(err, syscall.EISDIR) && sizeBytes == 0 {
return nil // no further action required!
}
return fmt.Errorf("could not create file '%s': %w", destination, err)
return helpers.ResponseAsError(err) //fmt.Errorf("could not create file '%s': %w", destination, err)

Check failure on line 143 in pkg/local/sync.go

View workflow job for this annotation

GitHub Actions / Run Linters and Checkers

commentFormatting: put a space between `//` and comment text (gocritic)
}
defer func() {
err = f.Close()
Expand Down Expand Up @@ -193,7 +193,8 @@ func (s *SyncManager) downloadFile(ctx context.Context, remote *uri.URI, path, d

_, err = io.Copy(f, barReader)
if err != nil {
return fmt.Errorf("could not write file '%s': %w", destination, err)
return helpers.ResponseAsError(err)
// return fmt.Errorf("could not write file '%s': %w", destination, err)
}
}
return nil
Expand Down Expand Up @@ -388,7 +389,8 @@ func (s *SyncManager) deleteRemote(ctx context.Context, remote *uri.URI, change
return
}
if resp.StatusCode() != http.StatusNoContent {
return fmt.Errorf("could not delete object: HTTP %d: %w", resp.StatusCode(), helpers.ErrRequestFailed)
return helpers.ResponseAsError(resp)
//return fmt.Errorf("could not delete object: HTTP %d: %w", resp.StatusCode(), helpers.ErrRequestFailed)

Check failure on line 393 in pkg/local/sync.go

View workflow job for this annotation

GitHub Actions / Run Linters and Checkers

commentFormatting: put a space between `//` and comment text (gocritic)
}
return
}
Expand Down

0 comments on commit cce44f3

Please sign in to comment.