Skip to content

InfluxDBException: 'error parsing query' - Error is not propagated to Consumer callback #498

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

Open
anastasiaO opened this issue Aug 27, 2018 · 0 comments

Comments

@anastasiaO
Copy link

Hello,

please take a look at InfluxDBImpl.java#L548

If you throw an InfluxDBException an this position, it is not possible to catch it on the caller side:

public void loadDataAsync(int chunk, Consumer<QueryResult> consumer) {
    // Bad syntax test
    db.query(new Query("SELECT * FROM sieries LIMIT -100", databaseName), chunk, consumer);
}

Stacktrace:

org.influxdb.InfluxDBException: {"error":"error parsing query: found -, expected integer at line 1, char 63"}

at org.influxdb.impl.InfluxDBImpl$1.onResponse(InfluxDBImpl.java:420)
at retrofit2.OkHttpCall$1.callSuccess(OkHttpCall.java:138)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:117)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

This causes my REST-Endpoint (Spring MVC) to hang.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant