influx_query_manager doesn't catch ApiException, so Influx error responses 500
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start at the influx_query_manager class and compare its query error handling with write(), which already catches both exception types. Check the existing tests around this class if available; done means Influx error responses are captured and queries degrade to an empty result instead of propagating a 500.
Written by the indexing model from the issue text.
Description
influx_query_manager catches urllib3.exceptions.HTTPError, which covers
connection failures but not error responses — influxdb_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.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 571
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 116
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Flagsmith/flagsmith
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Sales dashboard: download_org_data 500s with "Object of type generator is not JSON serializable" Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
TypeError: Cannot read properties of undefined (reading 'enabled') in CompareFeatures renderRow Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in Flagsmith/flagsmith
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100