Story #105846070 - show error message to user when service not available

This commit is contained in:
Matt Farnsworth 2015-12-11 15:46:29 +02:00
parent c926aa4100
commit 352c748258
3 changed files with 8 additions and 3 deletions

View file

@ -2,6 +2,11 @@ class Registrant::DomainsController < RegistrantController
def index
authorize! :view, :registrant_domains
ident_cc, ident = @current_user.registrant_ident.split '-'
@domains = BusinessRegistryCache.fetch_associated_domains ident, ident_cc
begin
@domains = BusinessRegistryCache.fetch_associated_domains ident, ident_cc
rescue Soap::Arireg::NotAvailableError => error
flash[:notice] = I18n.t(error.message[:message])
@domains = []
end
end
end