Merge branch '105846070-merge-with-105842700-arireg-for-registrant-port' into staging

This commit is contained in:
Vladimir Krylov 2016-01-25 14:38:03 +02:00
commit 19d9d3bf84
2 changed files with 5 additions and 1 deletions

View file

@ -44,7 +44,8 @@ class Registrant::DomainsController < RegistrantController
begin
BusinessRegistryCache.fetch_associated_domains ident, ident_cc
rescue Soap::Arireg::NotAvailableError => error
flash[:notice] = I18n.t(error.message[:message])
flash[:notice] = I18n.t(error.json[:message])
Rails.error.fatal("[EXCEPTION] #{error.to_s}")
current_user.domains
end
end

View file

@ -46,8 +46,11 @@ module Soap
class Arireg
class NotAvailableError < StandardError
attr_accessor :json
def initialize(params)
params[:message] = "#{I18n.t(:business_registry_service_not_available)}" unless params.key? :message
@json = params
super(params)
end
end