feat: log non-2xx responses in the HTTP data plane source - #99
Merged
simonlet merged 3 commits intoAug 28, 2026
Merged
Conversation
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
force-pushed
the
feat/log-non-2xx-http-dataplane-source-responses
branch
from
August 26, 2026 14:59
95aa7fe to
7d64d02
Compare
return entire error, if error response body can not be read
simonlet
force-pushed
the
feat/log-non-2xx-http-dataplane-source-responses
branch
from
August 27, 2026 07:54
154d921 to
e39f674
Compare
konradge
approved these changes
Aug 28, 2026
Collaborator
|
please create an Issue in this repo and attach it to #96 if this should be ported to future versions |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #100
Previously a non-2xx response from the data source was translated into a
StreamResultfailure withoutany log output, and the response body was closed without ever being read. For
401,403and404theresulting
StreamResultcarries no message at all, so neither the status code nor the body reached thelogs or the consumer.
HttpDataSourcenow emits a single warning containing the request method and URL, the status code, thestatus message and the response body (capped at 4096 bytes, read via
peekBodyso that it neitherconsumes the response nor can fail the error handling itself). The
StreamResultreturned to the calleris unchanged, so no internal backend detail is leaked to the consumer.
Reported downstream in sovity/edc-ee#1996.
🤖 Generated with Claude Code