diff --git a/src/main/java/io/cdap/plugin/salesforce/SalesforceConnectionUtil.java b/src/main/java/io/cdap/plugin/salesforce/SalesforceConnectionUtil.java index fc6135b1..8aba85fb 100644 --- a/src/main/java/io/cdap/plugin/salesforce/SalesforceConnectionUtil.java +++ b/src/main/java/io/cdap/plugin/salesforce/SalesforceConnectionUtil.java @@ -130,8 +130,7 @@ public static OAuthInfo getOAuthInfo(SalesforceConnectorInfo config, FailureColl } catch (Exception e) { String message = getSalesforceErrorMessageFromException(e); collector.addFailure("Error encountered while establishing connection: " + message, - "Please verify authentication properties are provided correctly") - .withStacktrace(e.getStackTrace()); + "Please verify authentication properties are provided correctly"); throw collector.getOrThrowException(); } return oAuthInfo; diff --git a/src/main/java/io/cdap/plugin/salesforce/plugin/source/batch/SalesforceSourceConfig.java b/src/main/java/io/cdap/plugin/salesforce/plugin/source/batch/SalesforceSourceConfig.java index 95081832..82115943 100644 --- a/src/main/java/io/cdap/plugin/salesforce/plugin/source/batch/SalesforceSourceConfig.java +++ b/src/main/java/io/cdap/plugin/salesforce/plugin/source/batch/SalesforceSourceConfig.java @@ -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 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); throw collector.getOrThrowException(); } }