diff --git a/lib/inspec/backend.rb b/lib/inspec/backend.rb index d63edd1df..7f103c02b 100644 --- a/lib/inspec/backend.rb +++ b/lib/inspec/backend.rb @@ -37,6 +37,11 @@ module Inspec end cls.new + + rescue Train::ClientError => e + raise "Client error, can't connect to '#{name}' backend: #{e.message}" + rescue Train::TransportError => e + raise "Transport error, can't connect to '#{name}' backend: #{e.message}" end end end