You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- sanitize non-2xx response errors by default (no upstream body)
- add returnFullError opt-in for raw body in error
- log truncated body at debug level when sanitized
- add regression tests + docs
## Breaking change
- non-2xx errors now return sanitized messages unless returnFullError is
enabled
## Testing
- go test ./internal/sources/http
Fixes#2617
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/en/resources/sources/http.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ headers:
32
32
queryParams:
33
33
param1: value1
34
34
param2: value2
35
+
# returnFullError: false
35
36
# disableSslVerification: false
36
37
```
37
38
@@ -49,6 +50,7 @@ instead of hardcoding your secrets into the configuration file.
49
50
| timeout | string | false | The timeout for HTTP requests (e.g., "5s", "1m", refer to [ParseDuration][parse-duration-doc] for more examples). Defaults to 30s. |
50
51
| headers | map[string]string | false | Default headers to include in the HTTP requests. |
51
52
| queryParams | map[string]string | false | Default query parameters to include in the HTTP requests. |
53
+
| returnFullError | bool | false | Include raw upstream response bodies in error messages for non-2xx responses. Defaults to `false`. |
52
54
| disableSslVerification | bool | false | Disable SSL certificate verification. This should only be used for local development. Defaults to `false`. |
0 commit comments