Skip to content

quic: QuicStream writer creates unhandled error #64290

Description

@martenrichter

I have currently a pattern, where the stream arrives with onheaders,
and then after some processing I may answer with:

  stream.sendHeaders({ ':status': status.toString() })
   stream.writer.endSync()

status is 404, the client on the other side (not a node.js client),
then errors the stream with code 256
and I get:

node:internal/quic/quic:1009
        error = makeQuicError(
                ^

QuicError: QUIC application error 256: stream reset with code 256
    at Stream.onStreamClose (node:internal/quic/quic:1009:17) {
  code: 'ERR_QUIC_APPLICATION_ERROR',
  reason: 'stream reset with code 256'
}

This caused by the drainWakeup promise, here:

drainWakeup.reject(error);

I wonder, if the user has to subscribe to some error to handle it.
But I think it is probably a problem how the writer interface is made here.
That is above my js skills.
@jasnell @pimterry do one of you have an idea, if it is a problem inside node.js or on my code outside node.js

Activity

  1. jasnell commented on Jul 4, 2026

    @jasnell
    Member

    Try adding onerror handlers to the endpoint and/or session and/or stream. the error propagation likely needs to be tweaked some more.

  2. martenrichter commented on Jul 4, 2026

    @martenrichter
    ContributorAuthor

    Thanks, I tried. But I do not see any of the handler firing. (Thoug the error goes away, but this is just changed timing).
    And actually I do not see in the source of the writer a kind of error propagation.

  3. added
    quicIssues and PRs related to the QUIC transport implementation.
    on Jul 4, 2026
  4. moved this from In Progress to Bug in QUIC Teamon Aug 8, 2026
  5. moved this from Bug to In Progress in QUIC Teamon Aug 16, 2026
  6. moved this from In Progress to Done in QUIC Teamon Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    quicIssues and PRs related to the QUIC transport implementation.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions