Open ldeffenb opened 3 months ago
One possible fix would be:
return fmt.Errorf("failed to read uploadItem %s: %w", ui.Address, err)
By referencing just the address component, it is properly formatted. But that still ignores the BatchID of the uploadItem structure key.
Context
2.0.0
Summary
While uploading with deferred, pinned uploads using the /bytes API, I see the following log:
Looks like the chunk ID is not properly formatted?
Expected behavior
I would expect the chunk ID to be readable, regardless of why this log is occurring.
Actual behavior
See log above.
Steps to reproduce
Not sure what causes the underlying failure, but I'm just uploading lots of files with the /bytes API with pinning and deferred upload options set.
Possible solution
Fix the source of the err for the log at: https://github.com/ethersphere/bee/blob/501f8a4ef9caddd2d080829270a77cdd67cf1573/pkg/pusher/pusher.go#L286
I think the actual error is formatted at: https://github.com/ethersphere/bee/blob/501f8a4ef9caddd2d080829270a77cdd67cf1573/pkg/storer/internal/upload/uploadstore.go#L631
but ui is an uploadItem structure that apparently doesn't have a good toString() implementation?