Exception: Datadog::AIGuard::AIGuardAbortError
- Inherits:
-
StandardError
- Object
- StandardError
- Datadog::AIGuard::AIGuardAbortError
- Defined in:
- lib/datadog/ai_guard.rb
Overview
This error is raised when allow_raise is set to true (the default) in Evaluation.perform
and AI Guard considers the messages not safe. Intended to be rescued by the user.
WARNING: This name must not change, since front-end is using it.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(action:, reason:, tags:) ⇒ AIGuardAbortError
constructor
A new instance of AIGuardAbortError.
- #to_s ⇒ Object
Constructor Details
#initialize(action:, reason:, tags:) ⇒ AIGuardAbortError
Returns a new instance of AIGuardAbortError.
22 23 24 25 26 27 28 |
# File 'lib/datadog/ai_guard.rb', line 22 def initialize(action:, reason:, tags:) super() @action = action @reason = reason @tags = end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
20 21 22 |
# File 'lib/datadog/ai_guard.rb', line 20 def action @action end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
20 21 22 |
# File 'lib/datadog/ai_guard.rb', line 20 def reason @reason end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
20 21 22 |
# File 'lib/datadog/ai_guard.rb', line 20 def @tags end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/datadog/ai_guard.rb', line 30 def to_s "Request interrupted. #{@reason}" end |