Skip to content

Update Error Handling to Reflect Accurate Error Message #131

@AbishekGollapudi

Description

@AbishekGollapudi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions