mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
catch for address issues in custom domain setup
This commit is contained in:
parent
a4defc69f7
commit
23992e34ba
1 changed files with 4 additions and 0 deletions
|
@ -231,7 +231,11 @@ post '/settings/:username/custom_domain' do
|
||||||
if e.message =~ /name or service not known/i
|
if e.message =~ /name or service not known/i
|
||||||
flash[:error] = 'Domain needs to be valid and already registered.'
|
flash[:error] = 'Domain needs to be valid and already registered.'
|
||||||
redirect "/settings/#{@site.username}#custom_domain"
|
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
|
end
|
||||||
|
|
||||||
raise e
|
raise e
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue