Class: Gapic::GRPC::DeadlineExceededError
- Inherits:
-
GRPC::DeadlineExceeded
- Object
- GRPC::DeadlineExceeded
- Gapic::GRPC::DeadlineExceededError
- Defined in:
- lib/gapic/grpc/errors.rb
Overview
An error class that represents Deadline Exceeded error with an optional retry root cause.
The GRPC layer throws ::GRPC::DeadlineExceeded without any context. If the deadline was exceeded while retrying another exception (e.g. ::GRPC::Unavailable), that exception could be useful for understanding the readon for the timeout.
This exception rewraps ::GRPC::DeadlineExceeded, adding an exception
that was being retried until the deadline was exceeded (if any) as a
root_cause
attribute.
Instance Attribute Summary collapse
-
#root_cause ⇒ Object?
readonly
The exception that was being retried when the DeadlineExceeded error occured.
Instance Method Summary collapse
-
#initialize(message, root_cause: nil) ⇒ DeadlineExceededError
constructor
A new instance of DeadlineExceededError.
Constructor Details
#initialize(message, root_cause: nil) ⇒ DeadlineExceededError
Returns a new instance of DeadlineExceededError.
54 55 56 57 |
# File 'lib/gapic/grpc/errors.rb', line 54 def initialize , root_cause: nil super @root_cause = root_cause end |
Instance Attribute Details
#root_cause ⇒ Object? (readonly)
Returns The exception that was being retried when the DeadlineExceeded error occured.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/gapic/grpc/errors.rb', line 45 class DeadlineExceededError < ::GRPC::DeadlineExceeded attr_reader :root_cause ## # @param message [String] The error message. # # @param root_cause [Object, nil] The exception that was being retried # when the DeadlineExceeded error occured. # def initialize , root_cause: nil super @root_cause = root_cause end end |