catch for address issues in custom domain setup

This commit is contained in:
Kyle Drake 2016-04-26 20:18:06 -07:00
parent a4defc69f7
commit 23992e34ba

View file

@ -231,7 +231,11 @@ post '/settings/:username/custom_domain' do
if e.message =~ /name or service not known/i
flash[:error] = 'Domain needs to be valid and already registered.'
redirect "/settings/#{@site.username}#custom_domain"
elsif e.message =~ /No address associated with hostname/i
flash[:error] = "The domain isn't setup to use Neocities yet, cannot add. Please make the A and CNAME record changes where you registered your domain."
redirect "/settings/#{@site.username}#custom_domain"
end
raise e
end