Skip to content

influx_query_manager doesn't catch ApiException, so Influx error responses 500 #8510

Description

@matthewelwell

influx_query_manager catches urllib3.exceptions.HTTPError, which covers
connection failures but not error responsesinfluxdb_client.rest.ApiException
subclasses InfluxDBError. So a 400/401/429/5xx from Influx propagates and 500s
the caller instead of degrading to an empty result. write() on the same class
already catches both.

-        except HTTPError as e:
+        except (HTTPError, InfluxDBError) as e:
             capture_exception(e)
             return []

Found via the sales dashboard, where get_events_for_organisation 500s the
organisation page if Influx responds with an error. CI never hits it because
there is no Influx service, so every query fails at the socket and is swallowed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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