Exception: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanHaveFallbacks::Exceptions::FallbackResultIsNotOverridden

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(step:, service:, status:) ⇒ void

This method returns an undefined value.



24
25
26
27
28
29
30
31
32
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_have_fallbacks/exceptions.rb', line 24

def initialize_with_kwargs(step:, service:, status:)
  message = <<~TEXT
    Neither `fallback_#{status}_result` nor `fallback_result` methods of `#{service.class}` are overridden, but the step is marked to be fallbacked.

    Either override one of those methods or remove the `fallback` option from the corresponding step definition in `#{step.container.klass}`.
  TEXT

  initialize(message)
end