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

Error handling refactor #1539

Closed
danielnelson opened this issue May 24, 2017 · 3 comments
Closed

Error handling refactor #1539

danielnelson opened this issue May 24, 2017 · 3 comments
Labels

Comments

@danielnelson
Copy link
Contributor

Steps:

  1. Go to admin page
  2. Try to create database named oh"no

Expected:
Database is created, or error displayed indicating the database name is invalid.

Actual:
Page displays "Cannot communicate with server."

Server logs contain:

time="2017-05-24T12:17:57-07:00" level=error msg="Error message received status code 400 from server: err: error parsing query: found BADSTRING, expected ; at line 1, char 22" component=server http_status =400 
time="2017-05-24T12:17:57-07:00" level=info msg="Response: Bad Request" code=400 component=server remote_addr="[::1]:59956" response_time=1.289548ms 
@goller
Copy link
Contributor

goller commented May 24, 2017

@danielnelson here is one of the error sites in the code: https://github.com/influxdata/chronograf/blob/master/influx/databases.go#L25

We'll need to run the escaping algorithm used in Influxql here:

https://github.com/influxdata/influxdb/blob/master/influxql/parser.go#L2930-L2933

@nhaugo
Copy link
Contributor

nhaugo commented Sep 5, 2017

• Chose one common error reporting scheme
• Remove promise based errors
• Use error string when displaying errors.

See also #1301

@nhaugo nhaugo added the ready label Sep 5, 2017
@nhaugo nhaugo changed the title Cannot create database with reserved characters Redo error handling Sep 5, 2017
@nhaugo nhaugo changed the title Redo error handling Error handling refactor Sep 5, 2017
@cryptoquick cryptoquick mentioned this issue Sep 22, 2017
4 tasks
@nhaugo nhaugo modified the milestones: 1.3.9, 1.3.10, 1.4.x Sep 27, 2017
@russorat
Copy link
Contributor

we now show this which i think is ok

image

@russorat russorat removed this from the 1.4.x milestone Jul 20, 2018
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