Skip to content

http2: Change in respondWithFile api not properly reflected in the docs #15390

Closed
@akc42

Description

The respondWithFile api has changed between 8.4.0 and 8.5.0 with the addition of the onError option. This is important, because a simple response.stream.on('error'... no longer works after this change because the steam gets destroyed on an error (in particular on ENOENT) if onError doesn't exist so any attempt to resend a different file then crashes with stream undefined.

However the docs, although creating an onError function in the example then doesn't actually use it on the call to respondWithFile

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.http2Issues or PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions