-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Comments
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. |
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. |
Grabbing this. |
Hey @jademcgough still working on this issue? |
@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 :) |
@jademcgough Oh, ok no problem, just let us know if you decide to pass it on :) |
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.
The text was updated successfully, but these errors were encountered: