Sha256: 637860862f904a5bc5e72b0049c934b6a2759504c7ea7af7ab45030b52038bec

Contents?: true

Size: 684 Bytes

Versions: 1

Compression:

Stored size: 684 Bytes

Contents

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

module Vault
  module Rails
    class VaultRailsError < RuntimeError; end

    class UnknownSerializerError < VaultRailsError
      def initialize(key)
        super <<-EOH
  Unknown Vault serializer `:#{key}'. Valid serializers are:

      #{SERIALIZERS.keys.sort.map(&:inspect).join(", ")}

  Please refer to the documentation for more examples.
  EOH
      end
    end

    class InvalidCiphertext < VaultRailsError
      def initialize(ciphertext)
        super <<~EOH
          Invalid ciphertext: `#{ciphertext}'.
        EOH
      end
    end

    class ValidationFailedError < VaultRailsError; end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vault-rails-0.9.0 lib/vault/rails/errors.rb