lib/submodules/ably-ruby/lib/ably/rest/channel.rb in ably-rest-0.9.3 vs lib/submodules/ably-ruby/lib/ably/rest/channel.rb in ably-rest-1.0.0
- old
+ new
@@ -67,14 +67,14 @@
Ably::Models::Message(message.dup).tap do |msg|
msg.encode client.encoders, options
next if msg.client_id.nil?
if msg.client_id == '*'
- raise Ably::Exceptions::IncompatibleClientId.new('Wildcard client_id is reserved and cannot be used when publishing messages', 400, 40012)
+ raise Ably::Exceptions::IncompatibleClientId.new('Wildcard client_id is reserved and cannot be used when publishing messages')
end
unless client.auth.can_assume_client_id?(msg.client_id)
- raise Ably::Exceptions::IncompatibleClientId.new("Cannot publish with client_id '#{msg.client_id}' as it is incompatible with the current configured client_id '#{client.client_id}'", 400, 40012)
+ raise Ably::Exceptions::IncompatibleClientId.new("Cannot publish with client_id '#{msg.client_id}' as it is incompatible with the current configured client_id '#{client.client_id}'")
end
end.as_json
end
response = client.post("#{base_path}/publish", payload.length == 1 ? payload.first : payload)
@@ -134,10 +134,10 @@
end
def decode_message(message)
message.decode client.encoders, options
rescue Ably::Exceptions::CipherError, Ably::Exceptions::EncoderError => e
- client.logger.error "Decoding Error on channel '#{name}', message event name '#{message.name}'. #{e.class.name}: #{e.message}"
+ client.logger.error { "Decoding Error on channel '#{name}', message event name '#{message.name}'. #{e.class.name}: #{e.message}" }
end
end
end
end