Exception: PgSqlTriggers::KillSwitchError
- Defined in:
- lib/pg_sql_triggers/errors.rb
Overview
Error raised when kill switch blocks an operation
Instance Attribute Summary
Attributes inherited from Error
#context, #error_code, #recovery_suggestion
Instance Method Summary collapse
Methods inherited from Error
#initialize, #to_h, #user_message
Constructor Details
This class inherits a constructor from PgSqlTriggers::Error
Instance Method Details
#default_error_code ⇒ Object
94 95 96 |
# File 'lib/pg_sql_triggers/errors.rb', line 94 def default_error_code "KILL_SWITCH_ACTIVE" end |
#default_message ⇒ Object
98 99 100 |
# File 'lib/pg_sql_triggers/errors.rb', line 98 def "Kill switch is active for this environment" end |
#default_recovery_suggestion ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/pg_sql_triggers/errors.rb', line 102 def default_recovery_suggestion ctx = @context || {} ctx[:operation] || "this operation" environment = ctx[:environment] || "this environment" "Kill switch is active for #{environment}. " \ "To override, provide the required confirmation text. " \ "For CLI/rake tasks, use: KILL_SWITCH_OVERRIDE=true CONFIRMATION_TEXT=\"...\" rake your:task" end |