questdb / questdb/py-questdb-client
Update Error Handling to Reflect Accurate Error Message
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 14
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 1
Description
Description
When data inserted via sender.dataframe() exceeds the configured max_buffer_size, calling sender.flush() raises an exception with the message "All values are null." — which is misleading and does not reflect the actual root cause (buffer overflow).
The root cause is only visible via err.__cause__, which shows a different, more accurate error. This makes debugging significantly harder for users.
Steps to reproduce
import questdb.ingress as qi
with qi.Sender(..., max_buffer_size=<small_value>) as sender:
try:
sender.dataframe(df, table_name="my_table")
sender.flush()
except Exception as err:
print(err) # Misleading: "All values are null."
print(err.__cause__) # Accurate: buffer size exceeded
Expected behavior
The top-level exception message should accurately describe the failure — e.g., "Buffer size exceeded: data exceeds the configured max_buffer_size limit." The root cause should not need to be inspected separately to understand what went wrong.
Actual behavior
err prints: All values are null.
err.__cause__ prints: the real buffer overflow error
Environment
- Language: Python
- Client: QuestDB Python ingress client (
questdb.ingress) - Method:
sender.dataframe()+sender.flush()
Suggested fix
The exception raised by flush() when the buffer limit is exceeded should surface the real cause directly in its message, or chain exceptions in a way that makes the root cause immediately visible without inspecting __cause__ manually.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start at the Python client's sender.dataframe() and sender.flush() flow, reproducing the issue with a small max_buffer_size and the example exception handling. Trace how the buffer-overflow error becomes the top-level "All values are null." message. Done means flush() directly exposes an accurate buffer-limit error, with coverage for the dataframe and flush scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100