Exception: BetterService::Errors::Runtime::ResourceNotFoundError
- Inherits:
-
RuntimeError
- Object
- StandardError
- BetterServiceError
- RuntimeError
- BetterService::Errors::Runtime::ResourceNotFoundError
- Defined in:
- lib/better_service/errors/runtime/resource_not_found_error.rb
Overview
Raised when a required resource is not found
This error wraps ActiveRecord::RecordNotFound exceptions raised during service execution (usually in the search phase).
Instance Attribute Summary
Attributes inherited from BetterServiceError
#code, #context, #original_error, #timestamp
Instance Method Summary collapse
-
#initialize(message = "Resource not found", code: :resource_not_found, context: {}, original_error: nil) ⇒ ResourceNotFoundError
constructor
A new instance of ResourceNotFoundError.
Methods inherited from BetterServiceError
#backtrace, #detailed_message, #inspect, #to_h
Constructor Details
#initialize(message = "Resource not found", code: :resource_not_found, context: {}, original_error: nil) ⇒ ResourceNotFoundError
Returns a new instance of ResourceNotFoundError.
35 36 37 |
# File 'lib/better_service/errors/runtime/resource_not_found_error.rb', line 35 def initialize( = "Resource not found", code: :resource_not_found, context: {}, original_error: nil) super(, code: code, context: context, original_error: original_error) end |