Exception: ConvenientService::Service::Plugins::CanHaveFallbacks::Exceptions::ServiceFallbackReturnValueNotSuccess Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(service:, result:, status:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



35
36
37
38
39
40
41
42
43
44
# File 'lib/convenient_service/service/plugins/can_have_fallbacks/exceptions.rb', line 35

def initialize_with_kwargs(service:, result:, status:)
  message = "    Return value of service `\#{service.class}`\#{enclose(status, \" \")}fallback is NOT a `success`.\n    It is `\#{result.status}`.\n\n    Did you accidentally call `failure` or `error` instead of `success` from the `fallback\#{enclose(status, \"_\")}result` method?\n  TEXT\n\n  initialize(message)\nend\n"