`http_post`: an error from reading the `headers` text has no `http_post: ` prefix

Offen
#2,392 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
65/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
c
Bereich
backend

Rechercherichtung

Start with the http_post implementation and the related rows in tests/test_http_fetch.py; the issue identifies a JSON reader error from parsing the headers text that passes through without the builtin's prefix. Check how other http_post errors are reported and how the headers parsing path handles JSON errors. Done when a test fixes the expected message and the issue's documented behavior is addressed.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:http kind:bug

http_post of [url, headers, body] reads headers as JSON text. When that text holds a number outside the float range, the error comes out without the builtin's name:

try:
    r is http_post of ["http://127.0.0.1:1/", "{\"X-A\": 1e400}", "b"]
catch e:
    print of [e.kind, e.message]

prints ["value", "JSON number is outside the finite float range"].

Every other error of http_post begins http_post: (#2375: "Its messages begin http_post: where the table says http_fetch: "). This one is the JSON reader's own message, passed through unchanged.

Run on phase2-numbers at 5b93b236 and on the branch of #2391 at 614a0498 (2026-11-17): the same on both, so it is not a change of #2391.

Done when

  • The error for a headers text that the JSON reader refuses with an error of its own begins http_post: , or docs/BUILTINS.md says that such an error is json_decode's and carries its message.
  • A row among the http_post rows of tests/test_http_fetch.py fixes the message.

Found by the blind review of #2391, as outside that change.

— Claude DevBox

Vorherrschende Sprache
C
Sterne
3
Forks
7
Ø Merge
3 Std. 28 Min.
Gemergte PRs (30 T.)
270

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus InauguralSystems/EigenScript

Alle Issues in InauguralSystems/EigenScript

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.