Enhance error handling in manager.rb by logging error messages and classes during transition failures

This commit is contained in:
Ari Karim 2025-05-27 14:15:39 +03:00
parent 5ccf764589
commit 94b23d46b7
No known key found for this signature in database
GPG Key ID: 1A5559E2E32F1805

View File

@ -61,7 +61,9 @@ module Workflower
@calling_model.assign_attributes flow.updateable_attributes(@calling_model)
flow.call_after_transition(@calling_model)
true
rescue Exception
rescue Exception => e
puts "ERROR MESSAGE: #{e.message}"
puts "ERROR CLASS: #{e}"
@calling_model.errors.add(@calling_model.workflower_state_column_name, :transition_faild)
false
end