Class: DynamoDB::FailureResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamodb/failure_response.rb

Overview

Failed response from Dynamo

The #error can be:

  • ‘ClientError` for 4XX responses

  • ‘ServerError` for 5XX or unknown responses

  • Network errors, which are enumerated in HttpHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_response = nil) ⇒ FailureResponse

Returns a new instance of FailureResponse.



11
12
13
# File 'lib/dynamodb/failure_response.rb', line 11

def initialize(http_response = nil)
  @http_response = http_response
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



9
10
11
# File 'lib/dynamodb/failure_response.rb', line 9

def body
  @body
end

#codeObject

Returns the value of attribute code.



9
10
11
# File 'lib/dynamodb/failure_response.rb', line 9

def code
  @code
end

#errorObject

Returns the value of attribute error.



9
10
11
# File 'lib/dynamodb/failure_response.rb', line 9

def error
  @error
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dynamodb/failure_response.rb', line 15

def success?
  false
end