cached gateway routing

This commit is contained in:
Stephan D
2026-02-20 15:38:22 +01:00
parent bc2bc3770d
commit 671ccc55a0
23 changed files with 777 additions and 23 deletions

View File

@@ -187,9 +187,14 @@ func (w *Wallets) List(ctx context.Context, filter model.ManagedWalletFilter) (*
query = query.Sort(repository.IDField(), true).Limit(&fetchLimit)
wallets, listErr := mutil.GetObjects[model.ManagedWallet](ctx, w.logger, query, nil, w.walletRepo)
if listErr != nil && !errors.Is(listErr, merrors.ErrNoData) {
w.logger.Warn("Wallet list failed", append(fields, zap.Error(listErr))...)
return nil, listErr
if listErr != nil {
if errors.Is(listErr, merrors.ErrNoData) {
wallets = make([]model.ManagedWallet, 0)
listErr = nil
} else {
w.logger.Warn("Wallet list failed", append(fields, zap.Error(listErr))...)
return nil, listErr
}
}
nextCursor := ""
@@ -208,7 +213,7 @@ func (w *Wallets) List(ctx context.Context, filter model.ManagedWalletFilter) (*
zap.Int("count", len(result.Items)),
zap.String("next_cursor", result.NextCursor),
)
if errors.Is(listErr, merrors.ErrNoData) {
if len(result.Items) == 0 {
w.logger.Debug("Wallet list empty", fields...)
} else {
w.logger.Debug("Wallet list fetched", fields...)