lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb in ably-rest-1.0.6 vs lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb in ably-rest-1.1.0
- old
+ new
@@ -155,10 +155,10 @@
protocol_message = Ably::Models::ProtocolMessage.new(event_data, logger: logger)
action_name = Ably::Models::ProtocolMessage::ACTION[event_data['action']] rescue event_data['action']
logger.debug { "WebsocketTransport: Prot msg recv <=: #{action_name} - #{event_data}" }
if protocol_message.invalid?
- error = Ably::Exceptions::ProtocolError.new("Invalid Protocol Message received: #{event_data}\nConnection moving to the failed state as the protocol is invalid and unsupported", 400, 80013)
+ error = Ably::Exceptions::ProtocolError.new("Invalid Protocol Message received: #{event_data}\nConnection moving to the failed state as the protocol is invalid and unsupported", 400, Ably::Exceptions::Codes::PROTOCOL_ERROR)
logger.fatal { "WebsocketTransport: #{error.message}" }
failed_protocol_message = Ably::Models::ProtocolMessage.new(
action: Ably::Models::ProtocolMessage::ACTION.Error,
error: error.as_json,
logger: logger