Drop HTTP three-value return exception, use result table #5

Open
opened 2026-07-21 20:35:43 +02:00 by michael · 1 comment
Owner

Goal

Change the http.get/post/put contract example from three positional
return values (body, status, nil / nil, nil, err) to a single result
table ({ body, status, headers }, nil / nil, err), aligning it with
the strict two-value result, nil / nil, err convention used
everywhere else. Removes the previously named HTTP exception from the
standard.

Acceptance criteria

  • Example in daw-code-standard.md updated
  • No other exception references remain

Technical notes

Implemented together with DAW/daw-lua-net (http_client.lua) and rolled
into the ongoing daw-lua-common 2.0.0 migration wave, since call sites
already needed touching. See DAW/steurjan issue for call-site adaptation.

## Goal Change the `http.get/post/put` contract example from three positional return values (`body, status, nil` / `nil, nil, err`) to a single result table (`{ body, status, headers }, nil` / `nil, err`), aligning it with the strict two-value `result, nil` / `nil, err` convention used everywhere else. Removes the previously named HTTP exception from the standard. ## Acceptance criteria - [ ] Example in `daw-code-standard.md` updated - [ ] No other exception references remain ## Technical notes Implemented together with DAW/daw-lua-net (http_client.lua) and rolled into the ongoing daw-lua-common 2.0.0 migration wave, since call sites already needed touching. See DAW/steurjan issue for call-site adaptation.
Author
Owner

Related: DAW/steurjan#144 (call-site adaptation)

Related: DAW/steurjan#144 (call-site adaptation)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-lua-net#5
No description provided.