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

HTTP errors are handled inconsistently #82

Open
Zero3 opened this issue Dec 10, 2018 · 1 comment
Open

HTTP errors are handled inconsistently #82

Zero3 opened this issue Dec 10, 2018 · 1 comment

Comments

@Zero3
Copy link

Zero3 commented Dec 10, 2018

Calling WriteAsync returns a IInfluxDataApiResponse which has the Success, StatusCode and Body properties. This implies that both successes and failures in calling InfluxDB will be communicated through the returned object.

But when the HTTP request to the database returns a HTTP 500 or 502 status, an InfluxDataApiException is thrown instead. This exception is undocumented and inconsistent with the return object. I think this is a bug.

@Zero3
Copy link
Author

Zero3 commented Jan 22, 2019

I have been thinking some more about this issue: Perhaps the meaning of IInfluxDataApiResponse is to represent the response from InfluxDB if the call succeeds through the HTTP layer and reaches the logic layer of InfluxDB. If so, I guess the current behaviour is fine, and the issue here is the lack of documentation of InfluxDataApiException and under which circumstances it is thrown.

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

1 participant