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
Copy file name to clipboardExpand all lines: framework-docs/modules/ROOT/pages/integration/rest-clients.adoc
+30-24
Original file line number
Diff line number
Diff line change
@@ -1078,57 +1078,63 @@ underlying HTTP client, which operates at a lower level and provides more contro
1078
1078
1079
1079
1080
1080
[[rest-http-interface-exceptions]]
1081
-
=== Exception Handling
1082
-
In order to provide a custom way of handling errors, you can register response
1083
-
status handlers on the underlying HTTP clients.
1081
+
=== Error Handling
1082
+
1083
+
To customize error response handling, you need to configure the underlying HTTP client.
1084
1084
1085
1085
For `RestClient`:
1086
1086
1087
-
By default, `RestClient` raises `RestClientException` for 4xx and 5xx HTTP status codes. To customize this, you can register a response status handler that applies to all responses performed through the client:
1087
+
By default, `RestClient` raises `RestClientException` for 4xx and 5xx HTTP status codes.
1088
+
To customize this, register a response status handler that applies to all responses
For more details and options, such as suppressing error status codes, see the Javadoc of `defaultStatusHandler` in `RestClient.Builder`.
1101
+
For more details and options, such as suppressing error status codes, see the Javadoc of
1102
+
`defaultStatusHandler` in `RestClient.Builder`.
1102
1103
1103
1104
For `WebClient`:
1104
1105
1105
-
By default, `WebClient` raises `WebClientResponseException` for 4xx and 5xx HTTP status codes. To customize this, you can register a response status handler that applies to all responses performed through the client:
1106
+
By default, `WebClient` raises `WebClientResponseException` for 4xx and 5xx HTTP status codes.
1107
+
To customize this, register a response status handler that applies to all responses
For more details and options, such as suppressing error status codes, see the Javadoc of `defaultStatusHandler` in `WebClient.Builder`.
1120
+
For more details and options, such as suppressing error status codes, see the Javadoc of
1121
+
`defaultStatusHandler` in `WebClient.Builder`.
1119
1122
1120
1123
For `RestTemplate`:
1121
1124
1122
-
By default, `RestTemplate` raises `RestClientException` for 4xx and 5xx HTTP status codes. To customize this, you can register an error handler that applies to all responses performed through the client:
1125
+
By default, `RestTemplate` raises `RestClientException` for 4xx and 5xx HTTP status codes.
1126
+
To customize this, register an error handler that applies to all responses
0 commit comments