Project

General

Profile

« Previous | Next » 

Revision cf6de107

Added by Bernhard Suttner almost 3 years ago

Fixes #33197 - Show error message if credentials are wrong

View differences:

app/models/compute_resources/foreman/model/vmware.rb
if e.message =~ /The remote system presented a public key with hash (\w+) but we're expecting a hash of/
raise Foreman::FingerprintException.new(
N_("The remote system presented a public key with hash %s but we're expecting a different hash. If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' or 'Load Datacenters' button and submit"), Regexp.last_match(1))
elsif e.message =~ /Cannot complete login due to an incorrect user name or password./
raise Foreman::UsernameOrPasswordException.new(
N_("Can not load datacenters due to an incorrect user name or password."))
else
raise e
end

Also available in: Unified diff