A crash in the task that continues `HttpClient.send` is lost
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, node.js
- Bereich
- backend
Rechercherichtung
Start with the HttpClient.send implementation and its fetch promise chain, focusing on the .then and .catch callbacks that invoke the scheduler. Reproduce the issue with src/Main.gren and run.sh, then add coverage using a task that throws after the response. Done means that task crash is reported normally and is not converted into a failed request or silently discarded.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Repository: gren-lang/node
Found against: gren 0.6.6, gren-lang/core 7.6.0, gren-lang/node 6.2.0
(and main at 982f87c), node 2
Summary
_HttpClient_request answers the scheduler from inside fetch's promise
chain, and the chain ends in a .catch that turns an error into a failed
request:
fetch(...)
.then((res) => { ... return callback(__Scheduler_succeed(...)); })
.catch((e) => { ... return callback(__Scheduler_fail(...)); });
callback steps the process there and then, so the task that continues the
response runs inside the .then. A crash there, a Debug.todo or a throw from
kernel code, is caught by the .catch as though the request had failed. The
second callback finds the binding already answered, and the crash is gone:
the program ends with nothing on stderr.
task after send |
prints | should print |
|---|---|---|
Task.andThen (\_ -> Debug.todo "after the response") |
nothing | Error: TODO in module \Main` on line 19` |
the same, after Task.succeed {} in place of the request |
Error: TODO in module \Main` on line 19` |
the same |
Reproduction
~/prj/gren-bug-reports/2026-10-12-httpclient-crash-after-response: ./run.sh
builds and runs src/Main.gren under devbox, which provides gren 0.6.6 and
node 22:
main : Node.SimpleProgram a
main =
Node.defineSimpleProgram <| \env ->
Init.await HttpClient.initialize <| \http ->
Node.endSimpleProgram
(HttpClient.get "data:text/plain,hello"
|> HttpClient.expectString
|> HttpClient.send http
|> Task.andThen (\_ -> Debug.todo "after the response")
|> Task.onError (\_ -> Stream.writeLineAsBytes "the request failed" env.stdout |> Task.map (\_ -> {}) |> Task.onError (\_ -> Task.succeed {}))
)
It prints nothing. Replacing the three HttpClient lines with Task.succeed {}
prints the TODO.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 13
- Forks
- 6
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus gren-lang/node
-
breaking enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
-
breaking enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
-
breaking bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 64/100
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
lyswhut/lx-music-desktop#3026 ·
-
good first issue server
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
openstreetmap/iD#13054 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community marketing priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Read a vector index's quantization back on Neo4j 2026.10, which reports vector.quantization.typeOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
liberation-data/drivine#231 ·
Maintainer antworten meist innerhalb von 1 Tag