Exception: PgSqlTriggers::ValidationError
- Defined in:
- lib/pg_sql_triggers/errors.rb
Overview
Error raised when validation fails
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
148 149 150 |
# File 'lib/pg_sql_triggers/errors.rb', line 148 def default_error_code "VALIDATION_FAILED" end |
#default_message ⇒ Object
152 153 154 |
# File 'lib/pg_sql_triggers/errors.rb', line 152 def "Validation failed" end |
#default_recovery_suggestion ⇒ Object
156 157 158 159 160 161 162 |
# File 'lib/pg_sql_triggers/errors.rb', line 156 def default_recovery_suggestion if context[:field] "Please fix the #{context[:field]} field and try again." else "Please review the input and ensure all required fields are provided." end end |