Error Handling

If you’re doing something that the InfluxDB API deems wrong, it will return an error. These errors can occur when trying to query or write data. The exceptions described below wrap the errors returned by the InfluxDB API, and you should probably make sure you handle them in your code.

Exception types

class inflow.InfluxDBException[source]

Generic exception for InfluxDB HTTP error’s, all other exceptions subclass from this one.

The message in this exception (and it’s subclasses) is the raw error message returned by the InfluxDB HTTP API.

class inflow.QueryFailedException[source]

Thrown when a query is rejected by the API. For example, this happens when you have a syntactically incorrect query.

class inflow.WriteFailedException[source]

Thrown when a write is rejected by the API.

class inflow.DatabaseNotFoundException[source]

Thrown when trying to write to a non-existing database.

class inflow.UnauthorizedException[source]

Thrown when trying to log in using incorrect credentials.

class inflow.ForbiddenException[source]

Thrown when a user is correctly logged in, but is not allowed to do the query or write action it wants to do.