Exception: Hyperion::WebSocket::HandshakeError
- Inherits:
-
StandardError
- Object
- StandardError
- Hyperion::WebSocket::HandshakeError
- Defined in:
- lib/hyperion/websocket/handshake.rb
Overview
Public end-user API: applications / middleware can ‘rescue` this to know “this was a WS upgrade attempt that failed at validation, NOT an unrelated 4xx”. WS-2 itself doesn’t raise this — it’s supplied for downstream consumers who want to build their own WS facade on top of ‘Handshake.validate`.
Instance Attribute Summary collapse
-
#extra_headers ⇒ Object
readonly
Returns the value of attribute extra_headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, message, extra_headers = {}) ⇒ HandshakeError
constructor
A new instance of HandshakeError.
Constructor Details
#initialize(status, message, extra_headers = {}) ⇒ HandshakeError
Returns a new instance of HandshakeError.
48 49 50 51 52 |
# File 'lib/hyperion/websocket/handshake.rb', line 48 def initialize(status, , extra_headers = {}) super() @status = status @extra_headers = extra_headers end |
Instance Attribute Details
#extra_headers ⇒ Object (readonly)
Returns the value of attribute extra_headers.
46 47 48 |
# File 'lib/hyperion/websocket/handshake.rb', line 46 def extra_headers @extra_headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
46 47 48 |
# File 'lib/hyperion/websocket/handshake.rb', line 46 def status @status end |