Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request throws AbortError rather than TimeoutError when passed AbortSignal.timeout(1000) as signal #2590

Closed
ShenHongFei opened this issue Jan 4, 2024 · 1 comment · Fixed by #2592
Labels
bug Something isn't working

Comments

@ShenHongFei
Copy link
Contributor

Bug Description

AbortError: Request aborted
    at abort (file:///D:/0/lib/deps.bundle.js:19008:18)
    at self.<computed> (file:///D:/0/lib/deps.bundle.js:19027:5)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:822:20)
    at EventTarget.dispatchEvent (node:internal/event_target:757:26)
    at abortSignal (node:internal/abort_controller:374:10)
    at Timeout._onTimeout (node:internal/abort_controller:128:7)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

Reproducible By

import { request } from 'undici'

await request('http://localhost', { signal: AbortSignal.timeout(1000) })

Expected Behavior

TimeoutError: xxx

Logs & Screenshots

image

Environment

latest node.js
latest windows

@ShenHongFei ShenHongFei added the bug Something isn't working label Jan 4, 2024
@mcollina
Copy link
Member

mcollina commented Jan 4, 2024

cc @KhafraDev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants