Class: Glia::Errors::Error
- Inherits:
-
Object
- Object
- Glia::Errors::Error
- Defined in:
- lib/glia/errors/error.rb
Overview
Base error
Direct Known Subclasses
AppleBusinessChatBusinessUsedByOtherSiteError, AuthorizationError, CarrierError, FacebookAccessTokenNotPermanentError, FacebookAccessTokenPermissionsError, GeographicPermissionError, HeadersValidationError, InputValidationError, InternalServerError, InvalidFormatError, InvalidLengthError, InvalidNumberError, InvalidResourceStateError, InvalidTypeError, InvalidValueError, ItemsOverlapError, MalformedInputError, MessageBlockedError, MissingValueError, NotVerifiedError, OAuthCodeAlreadyUsedError, OAuthCodeExpiredError, RecipientOptedOutError, RemainingAssociationError, ResourceAlreadyExistsError, ResourceLimitExceededError, ResourceMinimumNotReachedError, ResourceNotFoundError, RouteNotFoundError, ServiceUnavailableError, TelephonyProviderQueueLimitExceededError, TelephonyProviderRateLimitExceededError, TwilioMessagingServiceConfigurationError, UnknownError, UnreachableDestinationError
Instance Attribute Summary collapse
-
#error_details ⇒ Object
readonly
Returns the value of attribute error_details.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, ref:, message: nil, error_details: nil) ⇒ Error
constructor
A new instance of Error.
- #to_h ⇒ Object
Constructor Details
#initialize(type:, ref:, message: nil, error_details: nil) ⇒ Error
Returns a new instance of Error.
11 12 13 14 15 16 |
# File 'lib/glia/errors/error.rb', line 11 def initialize(type:, ref:, message: nil, error_details: nil) @type = type @ref = ref @message = @error_details = error_details end |
Instance Attribute Details
#error_details ⇒ Object (readonly)
Returns the value of attribute error_details.
9 10 11 |
# File 'lib/glia/errors/error.rb', line 9 def error_details @error_details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/glia/errors/error.rb', line 9 def @message end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
9 10 11 |
# File 'lib/glia/errors/error.rb', line 9 def ref @ref end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/glia/errors/error.rb', line 9 def type @type end |
Instance Method Details
#to_h ⇒ Object
18 19 20 |
# File 'lib/glia/errors/error.rb', line 18 def to_h { type: type, ref: ref, message: , error_details: error_details_to_h(@error_details) }.compact end |