go-data-transfer icon indicating copy to clipboard operation
go-data-transfer copied to clipboard

Return event but don't fail when encountering data of unknown encoding

Open willscott opened this issue 2 years ago • 1 comments

There may be cases where the sending side of a data transfer encounters a block of data encoded with a codec that is not known to it. Currently, as it attempts to make the ipld.Node representation and parse such a block, it will end up with an error, which will populate up to the overall data transfer. Instead, the raw contents of the block should still be able to be transferred un-parsed, but a channel even should be transmitted to indicate to the receiver that the node could not be parsed, and recursion into a potential dag below that item was not attempted. The receiver can then handle that as it wishes - potentially parsing the block locally and initiating additional transfers for links it discovers.

willscott avatar Aug 02 '21 06:08 willscott