lib/ledger_sync/domains/operation.rb in ledger_sync-domains-1.0.0.rc3 vs lib/ledger_sync/domains/operation.rb in ledger_sync-domains-1.0.0.rc4
- old
+ new
@@ -74,10 +74,14 @@
LedgerSync::Error::OperationError::PerformedOperationError.new(
operation: self
)
)
end
- return errors unless valid?
+
+ unless valid?
+ failure(errors)
+ return
+ end
@result = begin
operate
rescue LedgerSync::Error => e
failure(e)