Files
BC-bak/bc-export.ps1
Malin b407e2aeb7 fix: handle BC table locks with proper retry and backoff
BC returns 500 with "being updated in a transaction done by another
session" when tables are locked by other users - this is normal during
business hours. Previously the script gave up after 3 quick retries.

Changes:
- Invoke-BCApi: increased retries to 10, table lock errors get longer
  waits (30s + 15s per attempt, up to 120s) vs generic errors (10s)
- Export-EntityData: retries the whole entity up to 5 times on table
  lock with 60s/120s/180s/240s waits between attempts
- Export-DocumentWithLines: same entity-level retry, restarts the
  full document+lines export on table lock rather than giving up
- Also handles 429 rate limiting with longer backoff (30s per attempt)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 09:41:17 +01:00

16 KiB
Executable File