Exception: Operations::Command::OperationFailed
- Inherits:
-
StandardError
- Object
- StandardError
- Operations::Command::OperationFailed
- Defined in:
- lib/operations/command.rb
Overview
Provides message and meaningful sentry context for failed operations
Instance Attribute Summary collapse
-
#operation_result ⇒ Object
readonly
Returns the value of attribute operation_result.
Instance Method Summary collapse
-
#initialize(operation_result) ⇒ OperationFailed
constructor
A new instance of OperationFailed.
- #sentry_context ⇒ Object
Constructor Details
#initialize(operation_result) ⇒ OperationFailed
Returns a new instance of OperationFailed.
141 142 143 144 145 146 |
# File 'lib/operations/command.rb', line 141 def initialize(operation_result) @operation_result = operation_result operation_class_name = operation_result.operation&.operation&.class&.name super("#{operation_class_name} failed on #{operation_result.component}") end |
Instance Attribute Details
#operation_result ⇒ Object (readonly)
Returns the value of attribute operation_result.
139 140 141 |
# File 'lib/operations/command.rb', line 139 def operation_result @operation_result end |
Instance Method Details
#sentry_context ⇒ Object
148 149 150 |
# File 'lib/operations/command.rb', line 148 def sentry_context operation_result.as_json(include_command: true) end |