Skip to content
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
@dryajov

Description

@dryajov

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:

  1. we can't get Trailer headers unless the response ends
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions