Skip to content

Commit

Permalink
add: Redis error classes (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiroe authored Jun 17, 2024
1 parent 3c1c5ab commit 455e6f0
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion gems/redis/4.2/errors.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
class Redis
class BaseError < StandardError
class BaseError < RuntimeError
end

class ProtocolError < BaseError
def initialize: (untyped reply_type) -> void
end

class CommandError < BaseError
end

class BaseConnectionError < BaseError
end

class CannotConnectError < BaseConnectionError
end

class ConnectionError < BaseConnectionError
end

class TimeoutError < BaseConnectionError
end

class InheritedError < BaseConnectionError
end

class InvalidClientOptionError < BaseError
end

class Cluster
class OrchestrationCommandNotSupported < BaseError
def initialize: (untyped command, untyped subcommand) -> void
end

class CommandErrorCollection < BaseError
attr_reader errors: Hash[String, Redis::CommandError]
@errors: Hash[String, Redis::CommandError]

def initialize: (Hash[String, Redis::CommandError] errors, String error_message) -> void
end

class AmbiguousNodeError < BaseError
def initialize: (untyped command) -> void
end

class CrossSlotPipeliningError < BaseError
def initialize: (untyped keys) -> void
end
end
end

0 comments on commit 455e6f0

Please sign in to comment.