class AWS::DynamoDB::FailHandler

always fails with a throughput error

Attributes

call_count[R]

Public Class Methods

new() click to toggle source
# File spec/aws/dynamo_db/client_spec.rb, line 83
def initialize
  @call_count = 0
  @failure = nil
end

Public Instance Methods

access_fail() click to toggle source
# File spec/aws/dynamo_db/client_spec.rb, line 98
def access_fail
  @failure = "{\"__type\":\"VERSION#ExpiredTokenException\",\"message\":\"\"}"
  @status = 400
end
handle(req, resp) click to toggle source
# File spec/aws/dynamo_db/client_spec.rb, line 87
def handle req, resp
  @call_count += 1
  resp.body = @failure
  resp.status = @status
end
server_fail() click to toggle source
# File spec/aws/dynamo_db/client_spec.rb, line 103
def server_fail
  @failure = "{\"__type\":\"VERSION#ServerFailure\",\"message\":\"\"}"
  @status = 500
end
throughput_fail() click to toggle source
# File spec/aws/dynamo_db/client_spec.rb, line 93
def throughput_fail
  @failure = "{\"__type\":\"VERSION#ProvisionedThroughputExceededException\",\"message\":\"The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API\"}"
  @status = 400
end