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
`<destination-custom-resource-namespace>` can be omitted if the destination custom resource is created in the same namespace as the application workload.
77
80
:::
78
81
79
-
###2. Gateway
82
+
#### Dynamic Destination Gateway
80
83
81
84
Allows you to connect to arbitrary SAP destinations you have access to.
82
85
As a prerequisite, you have to create a Gateway Destination Custom Resource inside the Kubernetes cluster.
1.**Missing destination name for gateway**: Ensure the destination name is provided as the first parameter to `.gateway(<destination-name>, <destination-custom-resource-name>.<destination-custom-resource-namespace>)`
181
-
2.**Tenant context not available**: Verify tenant information is properly set in the request context
182
-
3.**Authentication failures**: Check that authentication headers and parameters are correctly configured
183
-
4.**Network connectivity**: Verify that the Transparent Proxy is accessible from your environment
184
-
185
-
### Evaluating Transparent Proxy Headers
186
-
187
-
When using proxy servers it can be difficult to troubleshoot issues as it is often not obvious where exactly the error occurred.
188
-
For example, with the Transparent Proxy errors might occur on the target system (e.g. OData service), the Destination Service or the Transparent Proxy itself.
189
-
190
-
To make troubleshooting easier the Transparent Proxy adds additional response headers to provide more information about where an error occurred.
191
-
For the above example of executing OData requests you can access the response headers as follows:
192
-
193
-
```java
194
-
try {
195
-
// execute OData request
196
-
} catch (ODataResponseException e) {
197
-
System.out.println(e.getHttpCode());
198
-
// the Transparent Proxy will attach additional response headers in case an error occurred
199
-
System.out.println(e.getHttpHeaders());
200
-
}
201
-
```
202
-
203
-
#### List of headers added by the Transparent Proxy
180
+
## Approach 2: Transparent Proxy Loader
204
181
205
-
-`X-Error-Origin` - the source of the error
206
-
-`X-Proxy-Server` - the proxy server (Transparent Proxy)
207
-
-`X-Error-Message` - thorough error message
208
-
-`X-Error-Internal-Code` - set only when the source of the error is the XSUAA or Destination service.
209
-
The value is the HTTP code returned from one of these services.
210
-
-`X-Request-Id` is sent with the response in all requests, both successful and failed
182
+
The `TransparentProxy` class provides a `DestinationLoader` that enables routing **all destination traffic** through a single registered gateway host.
183
+
This approach provides centralized proxy configuration where all destination requests are automatically routed through the configured gateway without requiring explicit destination builders.
211
184
212
-
For more information, see [Troubleshooting](https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/transparent-proxy-troubleshooting)
185
+
### When to Use This Approach
213
186
214
-
## Transparent Proxy Loader
215
-
216
-
The `TransparentProxy` class is a `DestinationLoader` that enables routing all destination traffic through a single registered gateway host.
217
-
This provides a centralized approach to proxy configuration where all destination requests are automatically routed through the configured gateway.
187
+
Use the Transparent Proxy Loader when:
188
+
- You want all destinations to automatically route through a single transparent proxy gateway
1.**Missing destination name for gateway**: Ensure the destination name is provided as the first parameter to `.gateway(<destination-name>, <destination-custom-resource-name>.<destination-custom-resource-namespace>)`
233
+
2.**Tenant context not available**: Verify tenant information is properly set in the request context
234
+
3.**Authentication failures**: Check that authentication headers and parameters are correctly configured
235
+
4.**Network connectivity**: Verify that the Transparent Proxy is accessible from your environment
236
+
237
+
### Evaluating Transparent Proxy Headers
238
+
239
+
When using proxy servers it can be difficult to troubleshoot issues as it is often not obvious where exactly the error occurred.
240
+
For example, with the Transparent Proxy errors might occur on the target system (e.g. OData service), the Destination Service or the Transparent Proxy itself.
241
+
242
+
To make troubleshooting easier the Transparent Proxy adds additional response headers to provide more information about where an error occurred.
243
+
For the above example of executing OData requests you can access the response headers as follows:
244
+
245
+
```java
246
+
try {
247
+
// execute OData request
248
+
} catch (ODataResponseException e) {
249
+
System.out.println(e.getHttpCode());
250
+
// the Transparent Proxy will attach additional response headers in case an error occurred
251
+
System.out.println(e.getHttpHeaders());
252
+
}
253
+
```
254
+
255
+
#### List of headers added by the Transparent Proxy
256
+
257
+
-`X-Error-Origin` - the source of the error
258
+
-`X-Proxy-Server` - the proxy server (Transparent Proxy)
259
+
-`X-Error-Message` - thorough error message
260
+
-`X-Error-Internal-Code` - set only when the source of the error is the XSUAA or Destination service.
261
+
The value is the HTTP code returned from one of these services.
262
+
-`X-Request-Id` is sent with the response in all requests, both successful and failed
263
+
264
+
For more information, see [Troubleshooting](https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/transparent-proxy-troubleshooting)
265
+
256
266
## Related Documentation
257
267
258
268
-[HTTP Client](http-client) - For using destinations with HTTP clients
0 commit comments