Skip to content

Commit

Permalink
Add additional exception case to catch ConnectionPoolTimeoutException… (
Browse files Browse the repository at this point in the history
#637)

* Add NPE catch

#256
  • Loading branch information
GDownes authored Jan 10, 2022
1 parent a2b1d34 commit 253fccd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions newrelic-agent/src/main/java/com/newrelic/agent/RPMService.java
Original file line number Diff line number Diff line change
Expand Up @@ -863,11 +863,13 @@ public void harvest(StatsEngine statsEngine) {
// LicenseException handled here
logMetricDataError(e);
retry = true;
String message = e.getMessage().toLowerCase();
// if our data can't be parsed, we probably have a bad metric
// (web transaction maybe?). clear out the metrics
if (message.contains("json") && message.contains("parse")) {
retry = false;
if (e.getMessage() != null) {
String message = e.getMessage().toLowerCase();
// if our data can't be parsed, we probably have a bad metric
// (web transaction maybe?). clear out the metrics
if (message.contains("json") && message.contains("parse")) {
retry = false;
}
}
}
long duration = System.nanoTime() - startTime;
Expand Down

0 comments on commit 253fccd

Please sign in to comment.