Exception: Tasker::PermanentError
- Inherits:
-
ProceduralError
- Object
- StandardError
- Error
- ProceduralError
- Tasker::PermanentError
- Defined in:
- lib/tasker/errors.rb
Overview
Error indicating a step failed permanently and should not be retried
Use this error when an operation fails due to permanent conditions like:
- Invalid request data (400 status)
- Authentication/authorization failures (401/403 status)
- Validation errors (422 status)
- Resource not found when it should exist (404 status in some contexts)
- Business logic violations
Instance Attribute Summary collapse
-
#context ⇒ Hash
readonly
Additional context for error monitoring and debugging.
-
#error_code ⇒ String?
readonly
Machine-readable error code for categorization.
Instance Method Summary collapse
-
#initialize(message, error_code: nil, context: {}) ⇒ PermanentError
constructor
A new instance of PermanentError.
Constructor Details
#initialize(message, error_code: nil, context: {}) ⇒ PermanentError
Returns a new instance of PermanentError.
84 85 86 87 88 |
# File 'lib/tasker/errors.rb', line 84 def initialize(, error_code: nil, context: {}) super() @error_code = error_code @context = context end |
Instance Attribute Details
#context ⇒ Hash (readonly)
Returns Additional context for error monitoring and debugging.
79 80 81 |
# File 'lib/tasker/errors.rb', line 79 def context @context end |
#error_code ⇒ String? (readonly)
Returns Machine-readable error code for categorization.
76 77 78 |
# File 'lib/tasker/errors.rb', line 76 def error_code @error_code end |