Skip to content

Commit 7d3197e

Browse files
docs(connect): document http connector response error handling (#1665)
related to camunda/camunda-bpm-platform#4241
1 parent 67e2e3c commit 7d3197e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

content/reference/connect/http-connector.md

+13
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@ HttpResponse response = http.createRequest()
109109
.execute();
110110
```
111111

112+
## Enabling HTTP Response Error Handling
113+
114+
By default, the HTTP connector does not seamlessly handle 4XX and 5XX related response errors during HTTP call.
115+
To activate the handling of these errors without additional scripting, set the `throw-http-error` property to `TRUE` via the `configOption` method. Once enabled, the client will throw an exception in case of http response errors (status code 400-599).
116+
117+
```java
118+
HttpResponse response = http.createRequest()
119+
.get()
120+
.configOption("throw-http-error", "TRUE")
121+
.url("http://camunda.org")
122+
.execute();
123+
```
124+
112125
## Using the Generic API
113126

114127
Besides the configuration methods also a generic API exists to

0 commit comments

Comments
 (0)