lib/shelly/cli/main.rb in shelly-0.4.13 vs lib/shelly/cli/main.rb in shelly-0.4.14

- old
+ new

@@ -66,12 +66,15 @@ upload_ssh_key list rescue Client::ValidationException => e e.each_error { |error| say_error "#{error}", :with_exit => false } rescue Client::UnauthorizedException => e - say_error "Wrong email or password", :with_exit => false - say_error "You can reset password by using link:", :with_exit => false - say_error e[:url] + say_error e[:error], :with_exit => false + if e[:url] + say_error "You can reset password by using link:", :with_exit => false + say_error e[:url] + end + exit 1 rescue Errno::ENOENT => e say_error e, :with_exit => false say_error "Use ssh-keygen to generate ssh key pair" end