Open Zero3 opened 5 years ago
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.
Calling
WriteAsync
returns aIInfluxDataApiResponse
which has theSuccess
,StatusCode
andBody
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.