Exception: Cent::TransportError

Inherits:
Error
  • Object
show all
Defined in:
lib/cent/error.rb

Overview

Raised when Centrifugo returns a non-2xx HTTP status.

Direct Known Subclasses

UnauthorizedError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status:, message: nil) ⇒ TransportError

Returns a new instance of TransportError.



17
18
19
20
# File 'lib/cent/error.rb', line 17

def initialize(status:, message: nil)
  @status = status
  super(message || "HTTP #{status}")
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



15
16
17
# File 'lib/cent/error.rb', line 15

def status
  @status
end