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

Influx shell: if there is an error parsing a JSON response, the shell does not show the actual body of the response #6856

Closed
mark-rushakoff opened this issue Jun 16, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@mark-rushakoff
Copy link
Contributor

When the Influx shell sees a JSON parsing error (which should never happen and is therefore indicative of a bug on the server), the shell only displays the parsing error and does not display the actual body of the response.

As seen in #6846:

> select non_negative_derivative(value) from snmp_rx where host='xxx' and type_instance='272662528' and time > now() - 10m
ERR: invalid character 'j' looking for beginning of value

The actual error message from the server might look like:

json: error calling MarshalJSON for type httpd.Response: json: error calling MarshalJSON for type *influxql.Result: json: unsupported value: NaN

Showing the full error message in the shell will help troubleshooting go more smoothly.

@e-dard
Copy link
Contributor

e-dard commented Jun 20, 2016

@mark-rushakoff is this serendipitously fixed via #6565?

@mark-rushakoff
Copy link
Contributor Author

@e-dard: Not fixed. I just tried on master as of bed66cf, with code added on the server to intentionally return non-JSON, and the client still does not print out the response body.

> select * from hello
ERR: invalid character '\x1f' looking for beginning of value
> exit

$ curl localhost:8086/query?q=hello
HELLO!

@jsternberg jsternberg added this to the 1.1.0 milestone Aug 4, 2016
@corylanou corylanou assigned corylanou and unassigned corylanou Sep 12, 2016
@jsternberg jsternberg self-assigned this Sep 19, 2016
@jsternberg
Copy link
Contributor

Fixed via #7280. It will be merged into the master branch after we release 1.0.1.

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

No branches or pull requests

4 participants