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

Make the error handling of the SDK more reliable #11

Open
saig0 opened this issue Dec 20, 2023 · 1 comment
Open

Make the error handling of the SDK more reliable #11

saig0 opened this issue Dec 20, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@saig0
Copy link
Contributor

saig0 commented Dec 20, 2023

Description

The SDK supports error handling by extracting the error code and error message from the SpaceTraders response.

Currently, the error code and message are extracted from the connector's error message by using FEEL string functions. It works but it is not very reliable.

With Camunda 8.3.3. it should be possible to access the error code and message directly from the response body. For example:

if error.code = "400" and response.body.error.code = 4236 
then bpmnError(response.body.error.code, response.body.error.message)
else null

Important: to access the error from the response body, it must be mapped in the result expression. The result expression is evaluated first. The output is the input for the error expression.

@saig0 saig0 added the enhancement New feature or request label Dec 20, 2023
@saig0 saig0 assigned saig0 and unassigned saig0 Feb 1, 2024
@saig0
Copy link
Contributor Author

saig0 commented May 14, 2024

Currently, it is not possible to access the response data of a failed request. I created a feature request for the REST connector: camunda/connectors#2520.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant