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

fix(runtime): error messages are now delivered correctly to operate when input validation fails #3704

Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ protected String composeMessage(Set<ConstraintViolation<Object>> violations) {
* property values.
*/
protected String buildValidationMessage(ConstraintViolation<Object> violation) {
return " - Property: " + violation.getPropertyPath().toString() + ": Validation failed.";
return " - Property: "
+ violation.getPropertyPath().toString()
+ ": Validation failed. Original message: "
+ violation.getMessage();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package io.camunda.connector.textract;

import static io.camunda.connector.textract.model.TextractRequestData.WRONG_OUTPUT_VALUES_MSG;
import static io.camunda.connector.textract.util.TextractTestUtils.ASYNC_EXECUTION_JSON_WITH_ROLE_ARN_AND_WITHOUT_SNS_TOPIC;
import static io.camunda.connector.textract.util.TextractTestUtils.ASYNC_EXECUTION_JSON_WITH_SNS_TOPIC_AND_WITHOUT_ROLE_ARN;
import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -85,6 +86,7 @@ void executeAsyncReqWithS3PrefixAndWithoutS3Bucket() {
ConnectorInputException.class,
() -> textractConnectorFunction.execute(outBounderContext));

assertThat(exception).hasMessageContaining(WRONG_OUTPUT_VALUES_MSG);
assertThat(exception).isInstanceOf(ConnectorInputException.class);
}

Expand Down
Loading