diff --git a/lib/active_record/connection_adapters/clickhouse/schema_statements.rb b/lib/active_record/connection_adapters/clickhouse/schema_statements.rb index 8c685c7e..d6dd0210 100644 --- a/lib/active_record/connection_adapters/clickhouse/schema_statements.rb +++ b/lib/active_record/connection_adapters/clickhouse/schema_statements.rb @@ -45,6 +45,8 @@ def internal_exec_query(sql, name = nil, binds = [], prepare: false, async: fals ActiveRecord::Result.new(result['meta'].map { |m| m['name'] }, result['data'], result['meta'].map { |m| [m['name'], type_map.lookup(m['type'])] }.to_h) rescue ActiveRecord::ActiveRecordError => e raise e + rescue Net::ReadTimeout, Net::WriteTimeout, Net::OpenTimeout => e + raise ActiveRecord::ConnectionFailed, "Response: #{e.message}" rescue StandardError => e raise ActiveRecord::ActiveRecordError, "Response: #{e.message}" end