1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Add remaining kinesis exceptions

This commit is contained in:
Michael Hale 2015-07-02 17:06:50 -04:00
parent 1b6a1b9eb9
commit 449fb4b6d7

View file

@ -3,7 +3,9 @@ module Fog
class Kinesis < Fog::Service
extend Fog::AWS::CredentialFetcher::ServiceMethods
class ExpiredIterator < Fog::Errors::Error; end
class LimitExceeded < Fog::Errors::Error; end
class ResourceInUse < Fog::Errors::Error; end
class ResourceNotFound < Fog::Errors::Error; end
class ExpiredIterator < Fog::Errors::Error; end
class InvalidArgument < Fog::Errors::Error; end
@ -101,8 +103,12 @@ module Fog
match = Fog::AWS::Errors.match_error(error)
raise if match.empty?
raise case match[:code]
when 'ExpiredIteratorException'
Fog::AWS::Kinesis::ExpiredIterator.slurp(error, match[:message])
when 'LimitExceededException'
Fog::AWS::Kinesis::LimitExceeded.slurp(error, match[:message])
when 'ResourceInUseException'
Fog::AWS::Kinesis::ResourceInUse.slurp(error, match[:message])
when 'ResourceNotFoundException'
Fog::AWS::Kinesis::ResourceNotFound.slurp(error, match[:message])
when 'ExpiredIteratorException'