Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Multiple queries with a series that doesnt exist shouldn't throw an exception #201

Closed
eoltean opened this issue Jun 15, 2015 · 2 comments
Closed

Comments

@eoltean
Copy link

eoltean commented Jun 15, 2015

When querying multiple series if one of the series does not exist it throws an exception and you cant get any results.

Some series are based off of continuous queries that may not have run yet. So I cant really know if the series exist yet without multiple queries to the database to first check if a given series exists.

I am not sure of the best solution to this but I don't think the client should throw an exception for this specific error case.

@aviau
Copy link
Collaborator

aviau commented Jun 15, 2015

This is an interesting issue.

I think that it is expected that the library raises exceptions when InfluxDB returns errors.

However, I could add an option that ignores errors but makes them available for you to read.

results = client.query("select * from this; select * from that", ignore_errors=True)
error_1 = results[0].error

result.error would be None when there are no Errors

What do you think? Any other ideas?

@eoltean
Copy link
Author

eoltean commented Jun 15, 2015

This seems like a good solution to me it solves the problem I was having and makes it so users can do there own error handling if need be.

aviau pushed a commit that referenced this issue Jun 16, 2015
@aviau aviau closed this as completed in c3f1013 Jun 16, 2015
aviau added a commit that referenced this issue Jun 16, 2015
New query option: raise_errors (Closes #201)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants