Skip to content

timeout option doesn't timeout body parsing #620

Description

@dword-design

Environment

ofetch: 1.5.1
Node.js: v22.21.1

Reproduction

https://github.com/dword-design/demo-ofetch-response-body-timeout

node index.js

Describe the bug

Looks like the timeout option only covers the request phase, but when a response is incomplete, the body parsing hangs.

Expected
When the response is incomplete, the request is aborted with a timeout error.

Actual
The request doesn't return.

Additional context

It works with { signal: AbortSignal.timeout(<timeout>) }. Probably because this is passed to the underlying fetch call.

Activity

  1. added
    bug
    on Aug 13, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions