This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Correctly propagate errors sent with trailer headers #607
Closed
Description
The changes in ipfs/js-ipfs#1036 have introduced errors through Trailer
headers (x-stream-error
), however, due to the way trailer headers are and our use of streams we can't correctly propagate them.
This is mainly a chicken and egg problem:
- we can't get Trailer headers unless the response ends
- we can't propagate the error, because the response stream ended
Since the processing of the request happens with through stream, once the response ends, our through streams end too, before getting a chance to communicate the error to them. We will possibly need to do some reworking of how we process responses because of that.