app/channels/stimulus_reflex/channel.rb in stimulus_reflex-3.5.0.pre10 vs app/channels/stimulus_reflex/channel.rb in stimulus_reflex-3.5.0.rc1

- old
+ new

@@ -25,27 +25,10 @@ if reflex reflex.rescue_with_handler(exception) reflex.logger&.error error_message reflex.broadcast_error data: data, error: "#{exception} #{exception.backtrace.first.split(":in ")[0] if Rails.env.development?}" else - if exception.is_a? StimulusReflex::Reflex::VersionMismatchError - mismatch = "Reflex failed due to stimulus_reflex gem/NPM package version mismatch. Package versions must match exactly.\nNote that if you are using pre-release builds, gems use the \"x.y.z.preN\" version format, while NPM packages use \"x.y.z-preN\".\n\nstimulus_reflex gem: #{StimulusReflex::VERSION}\nstimulus_reflex NPM: #{data["version"]}" - - StimulusReflex.config.logger.error("\n\e[31m#{mismatch}\e[0m") unless StimulusReflex.config.on_failed_sanity_checks == :ignore - - if Rails.env.development? - CableReady::Channels.instance[stream_name].console_log( - message: mismatch, - level: "error", - id: data["id"] - ).broadcast - end - - if StimulusReflex.config.on_failed_sanity_checks == :exit - sleep 0.1 - exit! - end - else + unless exception.is_a?(StimulusReflex::Reflex::VersionMismatchError) StimulusReflex.config.logger.error error_message end if error_message.to_s.include? "No route matches" initializer_path = Rails.root.join("config", "initializers", "stimulus_reflex.rb")