-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Is there a way to expose the exceptions and allow callers to capture and handle appropriately? Right now running a select_all on a rogue query quietly fails saying it got 0 results, as opposed to fail because of a logic error:
Simple steps to reproduce from the rails console:
>> # This should cause an exception as the function ccccccc() doesn't exist
>> ClickHouse.connection.select_all("SELECT ccccccc() from cccccccxxxxxx")
SQL (Total: 104MS, CH: 0MS)� SELECT ccccccc() from cccccccxxxxxx;�
Read: 0 rows, 0B. Written: 0 rows, 0B
[]
>> ClickHouse.connection.select_all("SELECT now()")
SQL (Total: 171MS, CH: 1MS)� SELECT now();�
Read: 1 rows, 1.0B. Written: 0 rows, 0B
[{"now()"=>2024-04-04 17:25:04 -0400}]
The exception is there in the faraday.body, but when converting to a ResultSet in the ClickHouse::Response::Factory.response() method that exception is never checked.
rctejon
Metadata
Metadata
Assignees
Labels
No labels
