Merge pull request #1486 from okriuchykhin/ok_SCI_3023

Improve error logging in protocol import [SCI-3023]
This commit is contained in:
Alex Kriuchykhin 2019-02-07 15:58:07 +01:00 committed by GitHub
commit dc7fdaa191
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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