From 1f45b940fc39f8c01737715a6ce45e4e207b26d8 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Mon, 18 Dec 2023 12:02:38 -0800 Subject: [PATCH] Remove inheritance of TimeoutError from ETIMEDOUT This should be its own error class, it does not come from an ETIMEDOUT, and inheriting from that makes this class hard to differentiate. Co-authored-by: Daniel Colson --- contrib/ruby/lib/trilogy/error.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/contrib/ruby/lib/trilogy/error.rb b/contrib/ruby/lib/trilogy/error.rb index a5b774bc..614d2d40 100644 --- a/contrib/ruby/lib/trilogy/error.rb +++ b/contrib/ruby/lib/trilogy/error.rb @@ -66,13 +66,7 @@ class QueryError < ClientError class CastError < ClientError end - class TimeoutError < Errno::ETIMEDOUT - include ConnectionError - - def initialize(error_message = nil, error_code = nil) - super - @error_code = error_code - end + class TimeoutError < BaseConnectionError end # DatabaseError was replaced by ProtocolError, but we'll keep it around as an