Skip to content

Commit

Permalink
Remove inheritance of TimeoutError from ETIMEDOUT
Browse files Browse the repository at this point in the history
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 <composerinteralia@github.com>
  • Loading branch information
jhawthorn and composerinteralia committed Dec 21, 2023
1 parent a29831f commit 1f45b94
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions contrib/ruby/lib/trilogy/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f45b94

Please sign in to comment.