Exception: AzureSearch::Errors::RetriableHttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/azure_search/errors.rb

Overview

Raised to indicate that a HTTP request needs to be retried.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ RetriableHttpError

Returns a new instance of RetriableHttpError.

Since:

  • 0.1.0



15
16
17
18
# File 'lib/azure_search/errors.rb', line 15

def initialize(code, message)
  self.code = code
  self.message = message
end

Instance Attribute Details

#codeSymbol

Returns The response status code.

Returns:

  • (Symbol)

    The response status code.

Since:

  • 0.1.0



11
12
13
# File 'lib/azure_search/errors.rb', line 11

def code
  @code
end

#messageSymbol

Returns The error message.

Returns:

  • (Symbol)

    The error message.

Since:

  • 0.1.0



13
14
15
# File 'lib/azure_search/errors.rb', line 13

def message
  @message
end

Instance Method Details

#to_sObject

Since:

  • 0.1.0



20
21
22
# File 'lib/azure_search/errors.rb', line 20

def to_s
  "RetriableHttpError <#{self.code}>: #{self.message}"
end