Module: Momento::Error
- Included in:
- AlreadyExistsError, AuthenticationError, BadRequestError, CancelledError, ClientResourceExhaustedError, ConnectionError, FailedPreconditionError, InternalServerError, InvalidArgumentError, LimitExceededError, NotFoundError, PermissionError, ServerUnavailableError, TimeoutError, UnknownError, UnknownServiceError
- Defined in:
- lib/momento/error.rb,
lib/momento/error/types.rb,
lib/momento/error/grpc_details.rb,
lib/momento/error/transport_details.rb
Overview
Errors from the Momento client or service, available as ‘response.error`.
Momento::Errors are Exceptions. They can be raised. If the error was caused by an exception, it will be available in #cause.
Defined Under Namespace
Classes: AlreadyExistsError, AuthenticationError, BadRequestError, CancelledError, ClientResourceExhaustedError, ConnectionError, FailedPreconditionError, GrpcDetails, InternalServerError, InvalidArgumentError, LimitExceededError, NotFoundError, PermissionError, ServerUnavailableError, TimeoutError, TransportDetails, UnknownError, UnknownServiceError
Instance Attribute Summary collapse
-
#cause ⇒ Exception
The original exception which was the cause of the error.
-
#context ⇒ Hash
Any context relevant to the error such as method arguments.
-
#details ⇒ String
Details about the error.
-
#transport_details ⇒ Momento::Error::TransportDetails
Details about the transport layer.
Instance Method Summary collapse
-
#error_code ⇒ Symbol
A Momento-specific code for the type of error.
-
#message ⇒ String
The error message.
-
#to_s ⇒ String
The error message.
Instance Attribute Details
#cause ⇒ Exception
Returns the original exception which was the cause of the error.
33 34 35 |
# File 'lib/momento/error.rb', line 33 def cause @cause end |
#context ⇒ Hash
Returns any context relevant to the error such as method arguments.
35 36 37 |
# File 'lib/momento/error.rb', line 35 def context @context end |
#details ⇒ String
Returns details about the error.
39 40 41 |
# File 'lib/momento/error.rb', line 39 def details @details end |
#transport_details ⇒ Momento::Error::TransportDetails
Returns details about the transport layer.
37 38 39 |
# File 'lib/momento/error.rb', line 37 def transport_details @transport_details end |
Instance Method Details
#error_code ⇒ Symbol
A Momento-specific code for the type of error.
|
# File 'lib/momento/error.rb', line 41
|
#message ⇒ String
The error message.
|
# File 'lib/momento/error.rb', line 45
|
#to_s ⇒ String
The error message.
50 51 52 |
# File 'lib/momento/error.rb', line 50 def to_s end |