Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update http-connector.md for Camunda HTTP Connector enhancement for 4XX and 5XX errors -GIT Issue 4241 #1665

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions content/reference/connect/http-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ HttpResponse response = http.createRequest()
.execute();
```

## Enabling HTTP Error Handling
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧

Suggested change
## Enabling HTTP Error Handling
## Enabling HTTP Response Error Handling


<strong>Note:</strong> HTTP Connector does not seamlessly handle 4XX and 5XX related response errors during HTTP call.
Custom scripts within workflows have to be employed to handle these errors.To support handling of
these errors without additional scripting set `throw-http-error` property to `TRUE` via `configOption`
method.
Copy link
Member

@danielkelemen danielkelemen Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧

Suggested change
<strong>Note:</strong> HTTP Connector does not seamlessly handle 4XX and 5XX related response errors during HTTP call.
Custom scripts within workflows have to be employed to handle these errors.To support handling of
these errors without additional scripting set `throw-http-error` property to `TRUE` via `configOption`
method.
By default, the HTTP connector does not seamlessly handle 4XX and 5XX related response errors during HTTP calls.
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).


```java
HttpResponse response = http.createRequest()
.get()
.configOption("throw-http-error", "TRUE")
.url("http://camunda.org")
.execute();
```

## Using the Generic API

Besides the configuration methods also a generic API exists to
Expand Down