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

cloud influxQLQueryApi.query() returned data plus error message #809

Open
dopsieee opened this issue Jan 17, 2025 · 0 comments
Open

cloud influxQLQueryApi.query() returned data plus error message #809

dopsieee opened this issue Jan 17, 2025 · 0 comments
Assignees

Comments

@dopsieee
Copy link

Proposal:
Hi,I found two functional optimization suggestions。(ps: translated this by tools, i'm not sure if it is correct. XD)

  1. When using the "influxQLQueryApi.query()" , the returned data does not contain error message, and no exception was throwed.
    When I used influxQL to query the data. I used the "avg()" function incorrectly (it should be "mean()"), which caused me to fail to get the data correctly, but the query api kept returning empty data. I thought there was no data at that time.
  2. InfluxQLQuery's default acceptHeader is csv, which is much less informative than json format.

Current behavior:
when using "influxQLQueryApi.query()", there is no error message in the returned data
this influxdb api "/query" 's returned data like this:

{
  "results": [
    {
      "statement_id": 0,
      "error": "undefined function ..."
    }
  ]
}

Desired behavior:
when using "influxQLQueryApi.query()", the returned data have error message.

Alternatives considered:
throw exception with error message

Use case:
maybe when influxQL goes wrong, the program knows what went wrong

thanks.

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