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

Conversation

Nandanrshenoy
Copy link
Contributor

@Nandanrshenoy Nandanrshenoy commented Jul 24, 2024

added documentation updates for http-connector error handling enhancement git issue : camunda/camunda-bpm-platform#4241

Change Description:
Current HTTP connector does not throw an error for 4XX and 5XX errors
The errors need to be explicitly handled by the modeler through an inline script.
Since this code of handling HTTP response is repeatable and reusable, it would be good to modify default behavior of http connector to throw a bpmnError in case of API call failures so that modeler can handle them as desired.
This has been made configurable through an engine setting by adding a new flag called throw-http-error. By default, this flag would be false, where modeler would have to explicitly handle such Errors. If marked true, then the feature that is being built to handle such errors should be enabled.

added documentation updates for http-connector error handling enhancement git issue : 4241

Signed-off-by: Shenoy, Nandan <Nandan.Shenoy@fmr.com>
Copy link
Member

@danielkelemen danielkelemen left a comment

Choose a reason for hiding this comment

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

👍 Looks nice! I added two minor improvements.

Comment on lines 114 to 117
<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).

@@ -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

…ttp connector error handling enhancement for 4XX and 5XX errors

git issue-4241 :Documentation update for http connector error handling enhancement for 4XX and 5XX errors

Signed-off-by: Shenoy, Nandan <Nandan.Shenoy@fmr.com>
@danielkelemen danielkelemen merged commit 7d3197e into camunda:master Aug 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants