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

[0.9.1-rc1] Database not found error not in json #3170

Closed
cburki opened this issue Jun 28, 2015 · 6 comments
Closed

[0.9.1-rc1] Database not found error not in json #3170

cburki opened this issue Jun 28, 2015 · 6 comments

Comments

@cburki
Copy link

cburki commented Jun 28, 2015

When writing into a non existing database, the error message is not in a JSON structure like other error messages.

curl -X POST 'http://192.168.1.1:8086/write?db=notexist' --data-binary @TEST_VALUES
database not found: "notexist"

curl -X POST 'http://192.168.1.1:8086/write?db=test&u=notexist&p=password' --data-binary @TEST_VALUES
{"error":"user not found"}

I think it is better to embedded all error messages in a JSON structure.

@benfb
Copy link

benfb commented Jul 3, 2015

This seems to be related to these lines or the way errors are handled. A search reveals that "user not found" is never returned directly, but rather as an error which may be relevant.

@beckettsean beckettsean modified the milestones: 0.9.4, 0.9.3 Jul 15, 2015
@beckettsean beckettsean modified the milestones: Next Point Release, 0.9.3 Aug 6, 2015
@otoolep
Copy link
Contributor

otoolep commented Nov 4, 2015

This should not be too difficult. Simply trace through the code to learn where errors are created, and use Go's built-in JSON encoding to spit out a JSON error.

@imogenkinsman
Copy link
Contributor

Grabbing this.

@aneshas
Copy link
Contributor

aneshas commented Nov 12, 2015

Hey @jademcgough still working on this issue?

@imogenkinsman
Copy link
Contributor

@aneshas will try to have a PR ready this weekend, I'm still ramping up my golang so I spent a few hours just familiarizing myself with the codebase :)

@aneshas
Copy link
Contributor

aneshas commented Nov 13, 2015

@jademcgough Oh, ok no problem, just let us know if you decide to pass it on :)

@timhallinflux timhallinflux modified the milestones: 0.10.0, Future Point Release Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants