Sha256: 7d28ec4ddaeaf64e62c141efb6c2d500e4c74c853aa4c024389a522af0317cae

Contents?: true

Size: 893 Bytes

Versions: 1

Compression:

Stored size: 893 Bytes

Contents

require 'riak/errors/base'

module Riak
  class ConnectionError < Error
  end

  class TlsError < ConnectionError
    class CertHostMismatchError < TlsError
      def initialize
        super t('ssl.cert_host_mismatch')
      end
    end

    class CertNotValidError < TlsError
      def initialize
        super t('ssl.cert_not_valid')
      end
    end

    class CertRevokedError < TlsError
      def initialize
        super t('ssl.cert_revoked')
      end
    end

    class ReadDataError < TlsError
      def initialize(actual, candidate)
        super t('ssl.read_data_error', actual: actual, candidate: candidate)
      end
    end

    class UnknownKeyTypeError < TlsError
      def initialize
        super t('ssl.unknown_key_type')
      end
    end
  end

  class UserConfigurationError < ConnectionError
    def initialize
      super t('pbc.user_not_username')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
riak-client-2.0.0.rc1 lib/riak/errors/connection_error.rb