Skip to content
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

Invalid query failure suppressed #66

Closed
luntain opened this issue May 18, 2018 · 5 comments
Closed

Invalid query failure suppressed #66

luntain opened this issue May 18, 2018 · 5 comments

Comments

@luntain
Copy link
Contributor

luntain commented May 18, 2018

select time from measurement is an invalid query, because "at least one non-time field must be querried", but you won't get this error through the lib because it just silently returns an empty result. I got that error when running the query in the cli.

maoe pushed a commit that referenced this issue May 19, 2018
maoe pushed a commit that referenced this issue May 19, 2018
* Handle top-level error objects
* Do not ignore error objects in the results object (fixes #66)
@maoe
Copy link
Owner

maoe commented May 19, 2018

I've fixed the issue in the feature/error-handling branch. Could you confirm if case_issue66 is the issue you described and check if it's fixed in this branch?

@luntain
Copy link
Contributor Author

luntain commented May 19, 2018

Thanks for fixing it. The errors are no longer suppressed. There is a regression. There is an exception thrown for empty result set.

*** Exception: UnexpectedResponse "BUG: key \"series\" not present in Database.InfluxDB.Query.query"

@maoe
Copy link
Owner

maoe commented May 20, 2018

Force pushed a change. Could you try again?

@luntain
Copy link
Contributor Author

luntain commented May 21, 2018

All good.

@maoe
Copy link
Owner

maoe commented May 21, 2018

Thanks for checking. I'll fix some comments, implement #67, check if it works on our code base, then release.

maoe pushed a commit that referenced this issue Sep 16, 2018
maoe pushed a commit that referenced this issue Sep 16, 2018
* Handle top-level error objects
* Do not ignore error objects in the results object (fixes #66)
maoe pushed a commit that referenced this issue Mar 26, 2019
maoe pushed a commit that referenced this issue Mar 26, 2019
* Handle top-level error objects
* Do not ignore error objects in the results object (fixes #66)
maoe pushed a commit that referenced this issue Jun 17, 2020
maoe pushed a commit that referenced this issue Jun 17, 2020
* Handle top-level error objects
* Do not ignore error objects in the results object (fixes #66)
maoe pushed a commit that referenced this issue Jun 17, 2020
maoe pushed a commit that referenced this issue Jun 17, 2020
* Handle top-level error objects
* Do not ignore error objects in the results object (fixes #66)
maoe pushed a commit that referenced this issue Jun 18, 2020
@maoe maoe closed this as completed in 8cdc95c Jun 19, 2020
maoe added a commit that referenced this issue Jun 19, 2020
v1.8.0

This release reworked the QueryResuls type class. There are some breaking changes:

* parseResults has been deprecated. QueryResults has now parseMeasurement method.
* Decoder has been monomorphized so that it can be used with lens. The original
  Decoder type has been renamed to SomeDecoder.
* QueryParams has now decoder field.
* parseResults and parseResultsWith had been using lenientDecoder and it caused
  some unintuitive behavior (#64, #66). Now they use strictDecoder instead.
* parseErrorObject now doesn't fail. It returns the error message of a response.
* parseQueryField which has been deprecated is now deleted.
* QueryResults instance for ShowSeries was broken. This is fixed.
* The constructor of Decoder, parseResultsWith, and parseResultsWithDecoder
  have been hidden from the top-level module. They're still available from
  Database.InfluxDB.JSON.

See #68 for how to migrate your code from v1.7.x to v1.8.x.
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

2 participants