Exception: Sndacs::Error::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Sndacs::Error::ResponseError
- Defined in:
- lib/sndacs/exceptions.rb
Overview
All responses with a code between 300 and 599 that contain an
Direct Known Subclasses
AccessDenied, AccountProblem, AmbiguousGrantByEmailAddress, BadDigest, BucketAlreadyExists, BucketAlreadyOwnedByYou, BucketNotEmpty, CredentialsNotSupported, CrossLocationLoggingProhibited, EntityTooLarge, EntityTooSmall, ExpiredToken, ForbiddenBucket, IncompleteBody, IncorrectNumberOfFilesInPostRequestPOST, InlineDataTooLarge, InternalError, InvalidAccessKeyId, InvalidAddressingHeader, InvalidArgument, InvalidBucketName, InvalidDigest, InvalidLocationConstraint, InvalidPayer, InvalidPolicyDocument, InvalidRange, InvalidSOAPRequest, InvalidSecurity, InvalidStorageClass, InvalidTargetBucketForLogging, InvalidToken, InvalidURI, KeyTooLong, MalformedACLError, MalformedPOSTRequest, MalformedXML, MaxMessageLengthExceeded, MaxPostPreDataLengthExceededErrorYour, MetadataTooLarge, MethodNotAllowed, MissingAttachment, MissingContentLength, MissingRequestBodyError, MissingSecurityElement, MissingSecurityHeader, NoLoggingStatusForKey, NoSuchBucket, NoSuchKey, NotImplemented, NotSignedUp, OperationAborted, PermanentRedirect, PreconditionFailed, Redirect, RequestIsNotMultiPartContent, RequestTimeTooSkewed, RequestTimeout, RequestTorrentOfBucketError, SignatureDoesNotMatch, SlowDown, TemporaryRedirect, TokenRefreshRequired, TooManyBuckets, UnexpectedContent, UnresolvableGrantByEmailAddress, UserKeyMustBeSpecified
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
-
.exception(code) ⇒ Object
Factory for all other Exception classes in module, each for every error response available from SNDA Cloud Storage.
Instance Method Summary collapse
-
#initialize(message, response) ⇒ ResponseError
constructor
Creates new Sndacs::ResponseError.
Constructor Details
#initialize(message, response) ⇒ ResponseError
Creates new Sndacs::ResponseError.
Parameters
- message - what went wrong
- response - Net::HTTPResponse object or nil
21 22 23 24 |
# File 'lib/sndacs/exceptions.rb', line 21 def initialize(, response) @response = response super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
14 15 16 |
# File 'lib/sndacs/exceptions.rb', line 14 def response @response end |
Class Method Details
.exception(code) ⇒ Object
Factory for all other Exception classes in module, each for every error response available from SNDA Cloud Storage
Parameters
- code - Code name of exception
Returns
Descendant of ResponseError suitable for that exception code or ResponseError class if no class found
35 36 37 38 39 |
# File 'lib/sndacs/exceptions.rb', line 35 def self.exception(code) Sndacs::Error.const_get(code) rescue NameError ResponseError end |