Skip to content

fix(task) #35 #36 #37 #38 #39 RequestTask and Client fixes, #31 add missing tests - #40

Merged
njoubert-cleverage merged 1 commit into
mainfrom
35
Oct 2, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
35

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #31.
Fixes #35.
Fixes #36.
Fixes #37.
Fixes #38.
Fixes #39.

Grouped in one PR because the fixes change the same task, client, tests, reference pages and the CHANGELOG Latest section.

RequestTask

Client

Tests (#31)

  • RequestTaskTest: body output, input overriding the options, 3xx / 4xx / 5xx codes declared valid, invalid code with skip / stop (error output, log with headers and body), transport error and error while reading the content (logged), log_response, non-array input, missing client.
  • ClientTest: accessors (getUri() / geUri()), GET with query string and encoded scalar URL parameters, JSON POST, raw body and custom headers, invalid method, invalid URL parameters, unknown option, request failure.
  • MissingClientExceptionTest, CleverAgeRestProcessExtensionTest, CleverAgeRestProcessBundleTest (new).

25 tests, 187/195 lines. The remaining lines are ClientRegistry and the compiler pass of the bundle, whose tests come with #34 (left out here to avoid conflicting files). Without the fix, 15 of the new tests fail.

Documentation: request_task.md (inputs, output, url_parameters, log_response, notes on valid codes and transport errors), client.md (URL parameters, geUri() deprecation, getApiUrl()).

Checked with process-bundle-demo (see the demo PR):

Process Before After
demo.rest.valid_client_error (400 declared valid) HTTP/2 400 returned for ... the response body is output
demo.rest.transport_error no REST request failed log logged, then Could not resolve host
demo.rest.log_response (-vvv, url from the input) Response received from '/configured/url', result object Response received from '/codes-postaux/communes/46800', status code / headers / content
demo.rest.url_parameter_int rawurlencode(): Argument #1 ($string) must be of type string, int given the response body is output
demo.rest.invalid_input array_merge(): Argument #2 must be of type array, string given RequestTask expects an array or empty input, string given
demo.rest.get unchanged

This PR and #34 both add entries to the CHANGELOG Latest section: the one merged second needs a rebase.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

🤖 Generated with Claude Code

…ort error log, log_response, input and url parameter types, getUri(); #31 add missing tests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment