BadResource
Error with Request.text()
in Deno
#27132
Labels
ext/http
related to ext/http
triage required 👀
Deno team needs to make a decision if this change is desired
Version: deno 2.1.1 (stable, release, x86_64-unknown-linux-gnu)
The following Deno server code produces seemingly random
BadResource: Bad resource ID
errors:Observed Behavior
The error probably occurs when the TCP connection is closed before the request body is fully read. Example error:
A Wireshark capture of a failed request shows the client closing the connection immediately after sending a POST request.
Expected Behavior
The server should not throw an error or throw a more descriptive error.
Context
I encountered this error while load testing my Deno server using wrk. The error occurred only on the end of a load test run, but not on every run.
Steps to Reproduce
A repository with unstable reproduction steps is available: deno-server-bug-repro.
The text was updated successfully, but these errors were encountered: