Exception: StandardLedger::PartialFailure

Inherits:
Error
  • Object
show all
Defined in:
lib/standard_ledger/errors.rb

Overview

Raised by ‘StandardLedger.post` when the inline portion of fan-out succeeded but enqueuing one or more async projections failed. The entry itself is durable; callers may choose to roll back or accept-and-log.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enqueued:, failed:) ⇒ PartialFailure

Returns a new instance of PartialFailure.



27
28
29
30
31
# File 'lib/standard_ledger/errors.rb', line 27

def initialize(enqueued:, failed:)
  @enqueued = enqueued
  @failed = failed
  super("Enqueued #{enqueued.size} projections; #{failed.size} failed to enqueue")
end

Instance Attribute Details

#enqueuedObject (readonly)

Returns the value of attribute enqueued.



25
26
27
# File 'lib/standard_ledger/errors.rb', line 25

def enqueued
  @enqueued
end

#failedObject (readonly)

Returns the value of attribute failed.



25
26
27
# File 'lib/standard_ledger/errors.rb', line 25

def failed
  @failed
end