Skip to content

feat: log non-2xx responses in the HTTP data plane source - #99

Merged
simonlet merged 3 commits into
sovity/0.14.0from
feat/log-non-2xx-http-dataplane-source-responses
Aug 28, 2026
Merged

feat: log non-2xx responses in the HTTP data plane source#99
simonlet merged 3 commits into
sovity/0.14.0from
feat/log-non-2xx-http-dataplane-source-responses

Conversation

@simonlet

@simonlet simonlet commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #100

Previously a non-2xx response from the data source was translated into a StreamResult failure without
any log output, and the response body was closed without ever being read. For 401, 403 and 404 the
resulting StreamResult carries no message at all, so neither the status code nor the body reached the
logs or the consumer.

HttpDataSource now emits a single warning containing the request method and URL, the status code, the
status message and the response body (capped at 4096 bytes, read via peekBody so that it neither
consumes the response nor can fail the error handling itself). The StreamResult returned to the caller
is unchanged, so no internal backend detail is leaked to the consumer.

Reported downstream in sovity/edc-ee#1996.

🤖 Generated with Claude Code

simonlet and others added 2 commits August 26, 2026 16:57
A non-2xx response from the data source was translated into a StreamResult
failure without any log output, and the response body was closed without
ever being read. For 401, 403 and 404 the resulting StreamResult carries no
message at all, so neither the status code nor the body reached the logs or
the consumer.

HttpDataSource now emits a single warning containing the request id, the
request method and URL, the status code, the status message and the response
body. The body is capped at 4096 bytes and read via peekBody, so reading it
neither consumes the response nor can fail the error handling itself.

The StreamResult returned to the caller is unchanged, so no internal backend
detail is leaked to the consumer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@simonlet
simonlet force-pushed the feat/log-non-2xx-http-dataplane-source-responses branch from 95aa7fe to 7d64d02 Compare August 26, 2026 14:59
@simonlet
simonlet requested a review from konradge August 26, 2026 15:02
return entire error, if error response body can not be read
@simonlet
simonlet force-pushed the feat/log-non-2xx-http-dataplane-source-responses branch from 154d921 to e39f674 Compare August 27, 2026 07:54
@konradge

Copy link
Copy Markdown
Collaborator

please create an Issue in this repo and attach it to #96 if this should be ported to future versions

@simonlet simonlet linked an issue Aug 28, 2026 that may be closed by this pull request
@simonlet
simonlet merged commit ad4d55b into sovity/0.14.0 Aug 28, 2026
34 of 35 checks passed
@simonlet
simonlet deleted the feat/log-non-2xx-http-dataplane-source-responses branch August 28, 2026 06:26
simonlet added a commit that referenced this pull request Sep 2, 2026
* feat: log non-2xx responses in the HTTP data plane source (#99)

* feat: log non-2xx responses in the HTTP data plane source

A non-2xx response from the data source was translated into a StreamResult
failure without any log output, and the response body was closed without
ever being read. For 401, 403 and 404 the resulting StreamResult carries no
message at all, so neither the status code nor the body reached the logs or
the consumer.

HttpDataSource now emits a single warning containing the request id, the
request method and URL, the status code, the status message and the response
body. The body is capped at 4096 bytes and read via peekBody, so reading it
neither consumes the response nor can fail the error handling itself.

The StreamResult returned to the caller is unchanged, so no internal backend
detail is leaked to the consumer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: set correct HTTP error codes

* feat: remove data source name from warning

return entire error, if error response body can not be read

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit ad4d55b)

* chore: release prep 0.14.0.4.1

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log Non-2xx responses from HTTP data source to data plane

2 participants