You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the after_commit method of hypermodel, the SendPacket operation is run which will return a promise, but it is not checked for an error state.
defself.after_commit(operation,model)# Calling public_columns_hash once insures all policies are loaded# before the first broadcast.@public_columns_hash ||= ActiveRecord::Base.public_columns_hashHyperstack::InternalPolicy.regulate_broadcast(model)do |data|
puts"Broadcast aftercommit hook: #{data}"ifHyperstack::Connection.show_diagnosticsif !Hyperstack.on_server? && Hyperstack::Connection.root_pathsend_to_server(operation,data,model.__synchromesh_update_time)rescuenil# fails if server no longer running so ignoreelseSendPacket.run(data,operation: operation,updated_at: model.__synchromesh_update_time)endendrescueActiveRecord::StatementInvalid=>eraiseeunlesse.message == "Could not find table 'hyperstack_connections'"endunlessRUBY_ENGINE == 'opal'
in the after_commit method of hypermodel, the
SendPacket
operation is run which will return a promise, but it is not checked for an error state.The line containing
SendPacket
should beThe easiest way to patch this is by adding this:
This will catch the error with the smallest patch. Note the patch needs to check if its a promise, but the actual fix does not.
The text was updated successfully, but these errors were encountered: