-
Notifications
You must be signed in to change notification settings - Fork 29
[🍒]fix: remove error stack trace from validation failures #358
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
Merged
vikasrathee-cs
merged 1 commit into
data-integrations:release/1.7
from
cloudsufi:cherry-pick/c1e11abf6aa72c63f777702c0789c335c77404b7
Jun 5, 2026
+3
−6
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -185,7 +185,6 @@ public void validate(FailureCollector collector, @Nullable OAuthInfo oAuthInfo) | |||||||||||
| queryDescriptor = SalesforceQueryParser.getObjectDescriptorFromQuery(query); | ||||||||||||
| } catch (SOQLParsingException e) { | ||||||||||||
| collector.addFailure(String.format("Invalid SOQL query '%s' : %s", query, e.getMessage()), null) | ||||||||||||
| .withStacktrace(e.getStackTrace()) | ||||||||||||
| .withConfigProperty(SalesforceSourceConstants.PROPERTY_QUERY); | ||||||||||||
| throw collector.getOrThrowException(); | ||||||||||||
| } | ||||||||||||
|
|
@@ -255,8 +254,7 @@ private void validateCompoundFields(String sObjectName, List<String> fieldNames, | |||||||||||
| String errorMessage = SalesforceConnectionUtil.getSalesforceErrorMessageFromException(e); | ||||||||||||
| collector.addFailure( | ||||||||||||
| String.format("Cannot establish connection to Salesforce to describe SObject: '%s' with error %s", | ||||||||||||
| sObjectName, errorMessage), null) | ||||||||||||
| .withStacktrace(e.getStackTrace()); | ||||||||||||
| sObjectName, errorMessage), null); | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
|
|
@@ -353,7 +351,7 @@ private boolean isCustomObject(String sObjectName, FailureCollector collector, O | |||||||||||
| } catch (ConnectionException e) { | ||||||||||||
| String message = SalesforceConnectionUtil.getSalesforceErrorMessageFromException(e); | ||||||||||||
| collector.addFailure(String.format("There was issue communicating with Salesforce due to error: %s", message), | ||||||||||||
| null).withStacktrace(e.getStackTrace()); | ||||||||||||
| null); | ||||||||||||
|
Comment on lines
353
to
+354
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix a minor grammatical typo in the error message: 'There was issue' should be 'There was an issue'.
Suggested change
|
||||||||||||
| throw collector.getOrThrowException(); | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a connection exception occurs while describing the SObject, we should immediately throw the collected exception to stop the validation process. Continuing validation when the connection is down can lead to redundant connection attempts and duplicate error messages in subsequent validation steps (such as
validatePKChunk).