outbox for gateways
This commit is contained in:
@@ -32,12 +32,12 @@ func NewBalances(logger mlogger.Logger, db *mongo.Database) (storage.BalancesSto
|
||||
Unique: true,
|
||||
}
|
||||
if err := repo.CreateIndex(uniqueIndex); err != nil {
|
||||
logger.Error("failed to ensure balances unique index", zap.Error(err))
|
||||
logger.Error("Failed to ensure balances unique index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
childLogger := logger.Named(model.AccountBalancesCollection)
|
||||
childLogger.Debug("balances store initialised", zap.String("collection", model.AccountBalancesCollection))
|
||||
childLogger.Debug("Balances store initialised", zap.String("collection", model.AccountBalancesCollection))
|
||||
|
||||
return &balancesStore{
|
||||
logger: childLogger,
|
||||
@@ -47,7 +47,7 @@ func NewBalances(logger mlogger.Logger, db *mongo.Database) (storage.BalancesSto
|
||||
|
||||
func (b *balancesStore) Get(ctx context.Context, accountRef bson.ObjectID) (*model.AccountBalance, error) {
|
||||
if accountRef.IsZero() {
|
||||
b.logger.Warn("attempt to get balance with zero account ID")
|
||||
b.logger.Warn("Attempt to get balance with zero account ID")
|
||||
return nil, merrors.InvalidArgument("balancesStore: zero account ID")
|
||||
}
|
||||
|
||||
@@ -56,25 +56,25 @@ func (b *balancesStore) Get(ctx context.Context, accountRef bson.ObjectID) (*mod
|
||||
result := &model.AccountBalance{}
|
||||
if err := b.repo.FindOneByFilter(ctx, query, result); err != nil {
|
||||
if errors.Is(err, merrors.ErrNoData) {
|
||||
b.logger.Debug("balance not found", mzap.AccRef(accountRef))
|
||||
b.logger.Debug("Balance not found", mzap.AccRef(accountRef))
|
||||
return nil, storage.ErrBalanceNotFound
|
||||
}
|
||||
b.logger.Warn("failed to get balance", zap.Error(err), mzap.AccRef(accountRef))
|
||||
b.logger.Warn("Failed to get balance", zap.Error(err), mzap.AccRef(accountRef))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
b.logger.Debug("balance loaded", mzap.AccRef(accountRef),
|
||||
b.logger.Debug("Balance loaded", mzap.AccRef(accountRef),
|
||||
zap.String("balance", result.Balance))
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (b *balancesStore) Upsert(ctx context.Context, balance *model.AccountBalance) error {
|
||||
if balance == nil {
|
||||
b.logger.Warn("attempt to upsert nil balance")
|
||||
b.logger.Warn("Attempt to upsert nil balance")
|
||||
return merrors.InvalidArgument("balancesStore: nil balance")
|
||||
}
|
||||
if balance.AccountRef.IsZero() {
|
||||
b.logger.Warn("attempt to upsert balance with zero account ID")
|
||||
b.logger.Warn("Attempt to upsert balance with zero account ID")
|
||||
return merrors.InvalidArgument("balancesStore: zero account ID")
|
||||
}
|
||||
|
||||
@@ -83,24 +83,24 @@ func (b *balancesStore) Upsert(ctx context.Context, balance *model.AccountBalanc
|
||||
|
||||
if err := b.repo.FindOneByFilter(ctx, filter, existing); err != nil {
|
||||
if errors.Is(err, merrors.ErrNoData) {
|
||||
b.logger.Debug("inserting new balance", zap.String("accountRef", balance.AccountRef.Hex()))
|
||||
b.logger.Debug("Inserting new balance", zap.String("accountRef", balance.AccountRef.Hex()))
|
||||
return b.repo.Insert(ctx, balance, filter)
|
||||
}
|
||||
b.logger.Warn("failed to fetch balance", zap.Error(err), zap.String("accountRef", balance.AccountRef.Hex()))
|
||||
b.logger.Warn("Failed to fetch balance", zap.Error(err), zap.String("accountRef", balance.AccountRef.Hex()))
|
||||
return err
|
||||
}
|
||||
|
||||
if existing.GetID() != nil {
|
||||
balance.SetID(*existing.GetID())
|
||||
}
|
||||
b.logger.Debug("updating balance", zap.String("accountRef", balance.AccountRef.Hex()),
|
||||
b.logger.Debug("Updating balance", zap.String("accountRef", balance.AccountRef.Hex()),
|
||||
zap.String("balance", balance.Balance))
|
||||
return b.repo.Update(ctx, balance)
|
||||
}
|
||||
|
||||
func (b *balancesStore) IncrementBalance(ctx context.Context, accountRef bson.ObjectID, amount string) error {
|
||||
if accountRef.IsZero() {
|
||||
b.logger.Warn("attempt to increment balance with zero account ID")
|
||||
b.logger.Warn("Attempt to increment balance with zero account ID")
|
||||
return merrors.InvalidArgument("balancesStore: zero account ID")
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ func NewJournalEntries(logger mlogger.Logger, db *mongo.Database) (storage.Journ
|
||||
Unique: true,
|
||||
}
|
||||
if err := repo.CreateIndex(uniqueIndex); err != nil {
|
||||
logger.Error("failed to ensure journal entries idempotency index", zap.Error(err))
|
||||
logger.Error("Failed to ensure journal entries idempotency index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ func NewJournalEntries(logger mlogger.Logger, db *mongo.Database) (storage.Journ
|
||||
},
|
||||
}
|
||||
if err := repo.CreateIndex(orgIndex); err != nil {
|
||||
logger.Error("failed to ensure journal entries organization index", zap.Error(err))
|
||||
logger.Error("Failed to ensure journal entries organization index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
childLogger := logger.Named(model.JournalEntriesCollection)
|
||||
childLogger.Debug("journal entries store initialised", zap.String("collection", model.JournalEntriesCollection))
|
||||
childLogger.Debug("Journal entries store initialised", zap.String("collection", model.JournalEntriesCollection))
|
||||
|
||||
return &journalEntriesStore{
|
||||
logger: childLogger,
|
||||
@@ -60,52 +60,52 @@ func NewJournalEntries(logger mlogger.Logger, db *mongo.Database) (storage.Journ
|
||||
|
||||
func (j *journalEntriesStore) Create(ctx context.Context, entry *model.JournalEntry) error {
|
||||
if entry == nil {
|
||||
j.logger.Warn("attempt to create nil journal entry")
|
||||
j.logger.Warn("Attempt to create nil journal entry")
|
||||
return merrors.InvalidArgument("journalEntriesStore: nil journal entry")
|
||||
}
|
||||
|
||||
if err := j.repo.Insert(ctx, entry, nil); err != nil {
|
||||
if mongo.IsDuplicateKeyError(err) {
|
||||
j.logger.Warn("duplicate idempotency key", zap.String("idempotency_key", entry.IdempotencyKey))
|
||||
j.logger.Warn("Duplicate idempotency key", zap.String("idempotency_key", entry.IdempotencyKey))
|
||||
return storage.ErrDuplicateIdempotency
|
||||
}
|
||||
j.logger.Warn("failed to create journal entry", zap.Error(err))
|
||||
j.logger.Warn("Failed to create journal entry", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
|
||||
j.logger.Debug("journal entry created", zap.String("idempotency_key", entry.IdempotencyKey),
|
||||
j.logger.Debug("Journal entry created", zap.String("idempotency_key", entry.IdempotencyKey),
|
||||
zap.String("entryType", string(entry.EntryType)))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (j *journalEntriesStore) Get(ctx context.Context, entryRef bson.ObjectID) (*model.JournalEntry, error) {
|
||||
if entryRef.IsZero() {
|
||||
j.logger.Warn("attempt to get journal entry with zero ID")
|
||||
j.logger.Warn("Attempt to get journal entry with zero ID")
|
||||
return nil, merrors.InvalidArgument("journalEntriesStore: zero entry ID")
|
||||
}
|
||||
|
||||
result := &model.JournalEntry{}
|
||||
if err := j.repo.Get(ctx, entryRef, result); err != nil {
|
||||
if errors.Is(err, merrors.ErrNoData) {
|
||||
j.logger.Debug("journal entry not found", mzap.ObjRef("entry_ref", entryRef))
|
||||
j.logger.Debug("Journal entry not found", mzap.ObjRef("entry_ref", entryRef))
|
||||
return nil, storage.ErrJournalEntryNotFound
|
||||
}
|
||||
j.logger.Warn("failed to get journal entry", zap.Error(err), mzap.ObjRef("entry_ref", entryRef))
|
||||
j.logger.Warn("Failed to get journal entry", zap.Error(err), mzap.ObjRef("entry_ref", entryRef))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
j.logger.Debug("journal entry loaded", mzap.ObjRef("entry_ref", entryRef),
|
||||
j.logger.Debug("Journal entry loaded", mzap.ObjRef("entry_ref", entryRef),
|
||||
zap.String("idempotency_key", result.IdempotencyKey))
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (j *journalEntriesStore) GetByIdempotencyKey(ctx context.Context, orgRef bson.ObjectID, idempotencyKey string) (*model.JournalEntry, error) {
|
||||
if orgRef.IsZero() {
|
||||
j.logger.Warn("attempt to get journal entry with zero organization ID")
|
||||
j.logger.Warn("Attempt to get journal entry with zero organization ID")
|
||||
return nil, merrors.InvalidArgument("journalEntriesStore: zero organization ID")
|
||||
}
|
||||
if idempotencyKey == "" {
|
||||
j.logger.Warn("attempt to get journal entry with empty idempotency key")
|
||||
j.logger.Warn("Attempt to get journal entry with empty idempotency key")
|
||||
return nil, merrors.InvalidArgument("journalEntriesStore: empty idempotency key")
|
||||
}
|
||||
|
||||
@@ -116,21 +116,21 @@ func (j *journalEntriesStore) GetByIdempotencyKey(ctx context.Context, orgRef bs
|
||||
result := &model.JournalEntry{}
|
||||
if err := j.repo.FindOneByFilter(ctx, query, result); err != nil {
|
||||
if errors.Is(err, merrors.ErrNoData) {
|
||||
j.logger.Debug("journal entry not found by idempotency key", zap.String("idempotency_key", idempotencyKey))
|
||||
j.logger.Debug("Journal entry not found by idempotency key", zap.String("idempotency_key", idempotencyKey))
|
||||
return nil, storage.ErrJournalEntryNotFound
|
||||
}
|
||||
j.logger.Warn("failed to get journal entry by idempotency key", zap.Error(err),
|
||||
j.logger.Warn("Failed to get journal entry by idempotency key", zap.Error(err),
|
||||
zap.String("idempotency_key", idempotencyKey))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
j.logger.Debug("journal entry loaded by idempotency key", zap.String("idempotency_key", idempotencyKey))
|
||||
j.logger.Debug("Journal entry loaded by idempotency key", zap.String("idempotency_key", idempotencyKey))
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (j *journalEntriesStore) ListByOrganization(ctx context.Context, orgRef bson.ObjectID, limit int, offset int) ([]*model.JournalEntry, error) {
|
||||
if orgRef.IsZero() {
|
||||
j.logger.Warn("attempt to list journal entries with zero organization ID")
|
||||
j.logger.Warn("Attempt to list journal entries with zero organization ID")
|
||||
return nil, merrors.InvalidArgument("journalEntriesStore: zero organization ID")
|
||||
}
|
||||
|
||||
@@ -152,10 +152,10 @@ func (j *journalEntriesStore) ListByOrganization(ctx context.Context, orgRef bso
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
j.logger.Warn("failed to list journal entries", zap.Error(err))
|
||||
j.logger.Warn("Failed to list journal entries", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
j.logger.Debug("listed journal entries", zap.Int("count", len(entries)))
|
||||
j.logger.Debug("Listed journal entries", zap.Int("count", len(entries)))
|
||||
return entries, nil
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewOutbox(logger mlogger.Logger, db *mongo.Database) (storage.OutboxStore,
|
||||
},
|
||||
}
|
||||
if err := repo.CreateIndex(statusIndex); err != nil {
|
||||
logger.Error("failed to ensure outbox status index", zap.Error(err))
|
||||
logger.Error("Failed to ensure outbox status index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ func NewOutbox(logger mlogger.Logger, db *mongo.Database) (storage.OutboxStore,
|
||||
Unique: true,
|
||||
}
|
||||
if err := repo.CreateIndex(eventIdIndex); err != nil {
|
||||
logger.Error("failed to ensure outbox eventId index", zap.Error(err))
|
||||
logger.Error("Failed to ensure outbox eventId index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
childLogger := logger.Named(model.OutboxCollection)
|
||||
childLogger.Debug("outbox store initialised", zap.String("collection", model.OutboxCollection))
|
||||
childLogger.Debug("Outbox store initialised", zap.String("collection", model.OutboxCollection))
|
||||
|
||||
return &outboxStore{
|
||||
logger: childLogger,
|
||||
@@ -58,20 +58,20 @@ func NewOutbox(logger mlogger.Logger, db *mongo.Database) (storage.OutboxStore,
|
||||
|
||||
func (o *outboxStore) Create(ctx context.Context, event *model.OutboxEvent) error {
|
||||
if event == nil {
|
||||
o.logger.Warn("attempt to create nil outbox event")
|
||||
o.logger.Warn("Attempt to create nil outbox event")
|
||||
return merrors.InvalidArgument("outboxStore: nil outbox event")
|
||||
}
|
||||
|
||||
if err := o.repo.Insert(ctx, event, nil); err != nil {
|
||||
if mongo.IsDuplicateKeyError(err) {
|
||||
o.logger.Warn("duplicate event ID", zap.String("eventId", event.EventID))
|
||||
o.logger.Warn("Duplicate event ID", zap.String("eventId", event.EventID))
|
||||
return merrors.DataConflict("outbox event with this ID already exists")
|
||||
}
|
||||
o.logger.Warn("failed to create outbox event", zap.Error(err))
|
||||
o.logger.Warn("Failed to create outbox event", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
|
||||
o.logger.Debug("outbox event created", zap.String("eventId", event.EventID),
|
||||
o.logger.Debug("Outbox event created", zap.String("eventId", event.EventID),
|
||||
zap.String("subject", event.Subject))
|
||||
return nil
|
||||
}
|
||||
@@ -93,17 +93,17 @@ func (o *outboxStore) ListPending(ctx context.Context, limit int) ([]*model.Outb
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
o.logger.Warn("failed to list pending outbox events", zap.Error(err))
|
||||
o.logger.Warn("Failed to list pending outbox events", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
o.logger.Debug("listed pending outbox events", zap.Int("count", len(events)))
|
||||
o.logger.Debug("Listed pending outbox events", zap.Int("count", len(events)))
|
||||
return events, nil
|
||||
}
|
||||
|
||||
func (o *outboxStore) MarkSent(ctx context.Context, eventRef bson.ObjectID, sentAt time.Time) error {
|
||||
if eventRef.IsZero() {
|
||||
o.logger.Warn("attempt to mark sent with zero event ID")
|
||||
o.logger.Warn("Attempt to mark sent with zero event ID")
|
||||
return merrors.InvalidArgument("outboxStore: zero event ID")
|
||||
}
|
||||
|
||||
@@ -112,44 +112,44 @@ func (o *outboxStore) MarkSent(ctx context.Context, eventRef bson.ObjectID, sent
|
||||
Set(repository.Field("sentAt"), sentAt)
|
||||
|
||||
if err := o.repo.Patch(ctx, eventRef, patch); err != nil {
|
||||
o.logger.Warn("failed to mark outbox event as sent", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Warn("Failed to mark outbox event as sent", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
return err
|
||||
}
|
||||
|
||||
o.logger.Debug("outbox event marked as sent", zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Debug("Outbox event marked as sent", zap.String("eventRef", eventRef.Hex()))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *outboxStore) MarkFailed(ctx context.Context, eventRef bson.ObjectID) error {
|
||||
if eventRef.IsZero() {
|
||||
o.logger.Warn("attempt to mark failed with zero event ID")
|
||||
o.logger.Warn("Attempt to mark failed with zero event ID")
|
||||
return merrors.InvalidArgument("outboxStore: zero event ID")
|
||||
}
|
||||
|
||||
patch := repository.Patch().Set(repository.Field("status"), model.OutboxStatusFailed)
|
||||
|
||||
if err := o.repo.Patch(ctx, eventRef, patch); err != nil {
|
||||
o.logger.Warn("failed to mark outbox event as failed", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Warn("Failed to mark outbox event as failed", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
return err
|
||||
}
|
||||
|
||||
o.logger.Debug("outbox event marked as failed", zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Debug("Outbox event marked as failed", zap.String("eventRef", eventRef.Hex()))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *outboxStore) IncrementAttempts(ctx context.Context, eventRef bson.ObjectID) error {
|
||||
if eventRef.IsZero() {
|
||||
o.logger.Warn("attempt to increment attempts with zero event ID")
|
||||
o.logger.Warn("Attempt to increment attempts with zero event ID")
|
||||
return merrors.InvalidArgument("outboxStore: zero event ID")
|
||||
}
|
||||
|
||||
patch := repository.Patch().Inc(repository.Field("attempts"), 1)
|
||||
|
||||
if err := o.repo.Patch(ctx, eventRef, patch); err != nil {
|
||||
o.logger.Warn("failed to increment outbox attempts", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Warn("Failed to increment outbox attempts", zap.Error(err), zap.String("eventRef", eventRef.Hex()))
|
||||
return err
|
||||
}
|
||||
|
||||
o.logger.Debug("outbox attempts incremented", zap.String("eventRef", eventRef.Hex()))
|
||||
o.logger.Debug("Outbox attempts incremented", zap.String("eventRef", eventRef.Hex()))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewPostingLines(logger mlogger.Logger, db *mongo.Database) (storage.Posting
|
||||
},
|
||||
}
|
||||
if err := repo.CreateIndex(entryIndex); err != nil {
|
||||
logger.Error("failed to ensure posting lines entry index", zap.Error(err))
|
||||
logger.Error("Failed to ensure posting lines entry index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ func NewPostingLines(logger mlogger.Logger, db *mongo.Database) (storage.Posting
|
||||
},
|
||||
}
|
||||
if err := repo.CreateIndex(accountIndex); err != nil {
|
||||
logger.Error("failed to ensure posting lines account index", zap.Error(err))
|
||||
logger.Error("Failed to ensure posting lines account index", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
childLogger := logger.Named(model.PostingLinesCollection)
|
||||
childLogger.Debug("posting lines store initialised", zap.String("collection", model.PostingLinesCollection))
|
||||
childLogger.Debug("Posting lines store initialised", zap.String("collection", model.PostingLinesCollection))
|
||||
|
||||
return &postingLinesStore{
|
||||
logger: childLogger,
|
||||
@@ -58,31 +58,31 @@ func NewPostingLines(logger mlogger.Logger, db *mongo.Database) (storage.Posting
|
||||
|
||||
func (p *postingLinesStore) CreateMany(ctx context.Context, lines []*model.PostingLine) error {
|
||||
if len(lines) == 0 {
|
||||
p.logger.Warn("attempt to create empty posting lines array")
|
||||
p.logger.Warn("Attempt to create empty posting lines array")
|
||||
return nil
|
||||
}
|
||||
|
||||
storables := make([]storable.Storable, len(lines))
|
||||
for i, line := range lines {
|
||||
if line == nil {
|
||||
p.logger.Warn("attempt to create nil posting line")
|
||||
p.logger.Warn("Attempt to create nil posting line")
|
||||
return merrors.InvalidArgument("postingLinesStore: nil posting line")
|
||||
}
|
||||
storables[i] = line
|
||||
}
|
||||
|
||||
if err := p.repo.InsertMany(ctx, storables); err != nil {
|
||||
p.logger.Warn("failed to create posting lines", zap.Error(err), zap.Int("count", len(lines)))
|
||||
p.logger.Warn("Failed to create posting lines", zap.Error(err), zap.Int("count", len(lines)))
|
||||
return err
|
||||
}
|
||||
|
||||
p.logger.Debug("posting lines created", zap.Int("count", len(lines)))
|
||||
p.logger.Debug("Posting lines created", zap.Int("count", len(lines)))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *postingLinesStore) ListByJournalEntry(ctx context.Context, entryRef bson.ObjectID) ([]*model.PostingLine, error) {
|
||||
if entryRef.IsZero() {
|
||||
p.logger.Warn("attempt to list posting lines with zero entry ID")
|
||||
p.logger.Warn("Attempt to list posting lines with zero entry ID")
|
||||
return nil, merrors.InvalidArgument("postingLinesStore: zero entry ID")
|
||||
}
|
||||
|
||||
@@ -98,17 +98,17 @@ func (p *postingLinesStore) ListByJournalEntry(ctx context.Context, entryRef bso
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
p.logger.Warn("failed to list posting lines by entry", zap.Error(err), mzap.ObjRef("entry_ref", entryRef))
|
||||
p.logger.Warn("Failed to list posting lines by entry", zap.Error(err), mzap.ObjRef("entry_ref", entryRef))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p.logger.Debug("listed posting lines by entry", zap.Int("count", len(lines)), mzap.ObjRef("entry_ref", entryRef))
|
||||
p.logger.Debug("Listed posting lines by entry", zap.Int("count", len(lines)), mzap.ObjRef("entry_ref", entryRef))
|
||||
return lines, nil
|
||||
}
|
||||
|
||||
func (p *postingLinesStore) ListByAccount(ctx context.Context, accountRef bson.ObjectID, limit int, offset int) ([]*model.PostingLine, error) {
|
||||
if accountRef.IsZero() {
|
||||
p.logger.Warn("attempt to list posting lines with zero account ID")
|
||||
p.logger.Warn("Attempt to list posting lines with zero account ID")
|
||||
return nil, merrors.InvalidArgument("postingLinesStore: zero account ID")
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ func (p *postingLinesStore) ListByAccount(ctx context.Context, accountRef bson.O
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
p.logger.Warn("failed to list posting lines by account", zap.Error(err), mzap.AccRef(accountRef))
|
||||
p.logger.Warn("Failed to list posting lines by account", zap.Error(err), mzap.AccRef(accountRef))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p.logger.Debug("listed posting lines by account", zap.Int("count", len(lines)), mzap.AccRef(accountRef))
|
||||
p.logger.Debug("Listed posting lines by account", zap.Int("count", len(lines)), mzap.AccRef(accountRef))
|
||||
return lines, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user