Skip to content

NullReferenceException in GetAsync/PostAsync catch blocks #107

@DmitryNaumov

Description

@DmitryNaumov

We ran into situation when our influxdb instance experiencing issues or is down and during that time the library raises unexpected NullReferenceException. We found that it is because it expects InnerException to be always present, which is the true. And also matching exception cases by string literals is imo subject of system locale. And finally mostly no code is ready to get null instead of HttpResponseMessage.

https://github.com/AdysTech/InfluxDB.Client.Net/blob/master/src/DataStructures/InfluxDBClient.cs#L182

I'll submit a proposed solution later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions