Skip to content
  • Richard Machielse's avatar
    4b629eca
    ActionCable: use find method when unsubscribing · 4b629eca
    Richard Machielse authored
    If a frontend for some reason tries to unsubscribe from a non existing subscription, the following error is logged:
    
    Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [NoMethodError - undefined method `unsubscribe_from_channel' for nil:NilClass]
    
    Instead, it will now properly log:
    
    Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [RuntimeError - Unable to find subscription with identifier: {"channel":"SomeChannel"}]
    4b629eca
    ActionCable: use find method when unsubscribing
    Richard Machielse authored
    If a frontend for some reason tries to unsubscribe from a non existing subscription, the following error is logged:
    
    Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [NoMethodError - undefined method `unsubscribe_from_channel' for nil:NilClass]
    
    Instead, it will now properly log:
    
    Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [RuntimeError - Unable to find subscription with identifier: {"channel":"SomeChannel"}]
Loading