Improve error loggin in protocol import [SCI-3023]

This commit is contained in:
Oleksii Kriuchykhin 2019-02-07 14:00:24 +01:00
parent 108d8474f1
commit 3376fd012c

View file

@ -574,8 +574,10 @@ class ProtocolsController < ApplicationController
transaction_error = false
Protocol.transaction do
begin
protocol = import_new_protocol(@protocol_json, @team, @type, current_user)
rescue Exception
protocol =
import_new_protocol(@protocol_json, @team, @type, current_user)
rescue StandardError => ex
Rails.logger.error ex.message
transaction_error = true
raise ActiveRecord:: Rollback
end