Exception: Typed::NoPayloadOnFailureError

Inherits:
StandardError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/typed/no_payload_on_failure_error.rb

Overview

Error when user attempts to access payload from a Failure Result.

Instance Method Summary collapse

Constructor Details

#initializeNoPayloadOnFailureError

Returns a new instance of NoPayloadOnFailureError.



10
11
12
# File 'lib/typed/no_payload_on_failure_error.rb', line 10

def initialize
  super("Attempted to access `payload` from a Failure Result. You were probably expecting a Success Result. Check the result with `#success?` or `#failure?` before attempting to access `payload`.") # rubocop:disable Layout/LineLength
end