Import the longest bank-permitted history and surface real provider errors
Manual history imports failed opaquely once a bank capped lookback on an established consent (N26 rejects date_from beyond ~90 days with WRONG_TRANSACTIONS_PERIOD). Backfill now requests the documented longest fetching strategy, reports the coverage the bank actually provided, and non-2xx responses surface allowlisted documented error codes instead of a generic fallback. Dead-session codes map to reconnection. Failed syncs retry hourly so a stale sync banner no longer persists for a day.
This commit is contained in:
@@ -23,7 +23,7 @@ func (b *historyBank) Authorize(_ context.Context, _, _, state string) (string,
|
||||
return "https://bank.example/authorize", nil
|
||||
}
|
||||
|
||||
func (b *historyBank) Transactions(_ context.Context, account domain.Account, from, to string) ([]domain.Facts, error) {
|
||||
func (b *historyBank) Transactions(_ context.Context, account domain.Account, from, to string, _ bool) ([]domain.Facts, error) {
|
||||
b.fromDates = append(b.fromDates, from)
|
||||
var rows []domain.Facts
|
||||
for _, days := range []int{400, 300, 1} {
|
||||
|
||||
Reference in New Issue
Block a user