Skip to content

Commit 253fccd

Browse files
authored
Add additional exception case to catch ConnectionPoolTimeoutException… (#637)
* Add NPE catch #256
1 parent a2b1d34 commit 253fccd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

newrelic-agent/src/main/java/com/newrelic/agent/RPMService.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,11 +863,13 @@ public void harvest(StatsEngine statsEngine) {
863863
// LicenseException handled here
864864
logMetricDataError(e);
865865
retry = true;
866-
String message = e.getMessage().toLowerCase();
867-
// if our data can't be parsed, we probably have a bad metric
868-
// (web transaction maybe?). clear out the metrics
869-
if (message.contains("json") && message.contains("parse")) {
870-
retry = false;
866+
if (e.getMessage() != null) {
867+
String message = e.getMessage().toLowerCase();
868+
// if our data can't be parsed, we probably have a bad metric
869+
// (web transaction maybe?). clear out the metrics
870+
if (message.contains("json") && message.contains("parse")) {
871+
retry = false;
872+
}
871873
}
872874
}
873875
long duration = System.nanoTime() - startTime;

0 commit comments

Comments
 (0)