influxdata / influxdata/influxdb-client-java

Question : logs or throwing exceptions ?

Open
#847 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
477
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Question:

Is there a reason we are logging here and other places, instead of throwing an exception ?

I'd be intersted in suppressing logs from InfluxDb but i still want to be able to know what kind of connection error I get.

Is it too expensive to throw exceptions?

Best regards

````
@Nullable
public Ready ready() {
Call call = this.readyService.getReady((String)null);
try {
return (Ready)this.execute(call);
} catch (InfluxException e) {
LOG.log(Level.WARNING, "The exception occurs during check instance readiness", e);
return null;
}
}
````

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue points to the Java ready() method, its execute(call) invocation, and the InfluxException handler. Start by tracing those entry points and comparing the surrounding logging behavior; done means the project has a decided error-reporting behavior that preserves connection-error details while allowing logs to be suppressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.