lib/legion/crypt/vault.rb in legion-crypt-0.2.1 vs lib/legion/crypt/vault.rb in legion-crypt-0.2.2
- old
+ new
@@ -20,9 +20,13 @@
Legion::Settings[:crypt][:vault][:connected] = true if ::Vault.sys.health_status.initialized?
return unless Legion.const_defined? 'Extensions::Actors::Every'
require_relative 'vault_renewer'
@renewer = Legion::Crypt::Vault::Renewer.new
+ rescue StandardError => e
+ Legion::Logging.error e.message
+ Legion::Settings[:crypt][:vault][:connected] = false
+ false
end
def read(path, type = 'legion')
full_path = type.nil? || type.empty? ? "#{type}/#{path}" : path
lease = ::Vault.logical.read(full_path)